{"action":"created","issue":{"url":"https://api.github.com/repos/Annotopia/Annotopia/issues/16","labels_url":"https://api.github.com/repos/Annotopia/Annotopia/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Annotopia/Annotopia/issues/16/comments","events_url":"https://api.github.com/repos/Annotopia/Annotopia/issues/16/events","html_url":"https://github.com/Annotopia/Annotopia/issues/16","id":63765150,"number":16,"title":"Can't PUT to update Annotation Set","user":{"login":"stain","id":253413,"avatar_url":"https://avatars.githubusercontent.com/u/253413?v=3","gravatar_id":"","url":"https://api.github.com/users/stain","html_url":"https://github.com/stain","followers_url":"https://api.github.com/users/stain/followers","following_url":"https://api.github.com/users/stain/following{/other_user}","gists_url":"https://api.github.com/users/stain/gists{/gist_id}","starred_url":"https://api.github.com/users/stain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stain/subscriptions","organizations_url":"https://api.github.com/users/stain/orgs","repos_url":"https://api.github.com/users/stain/repos","events_url":"https://api.github.com/users/stain/events{/privacy}","received_events_url":"https://api.github.com/users/stain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-23T16:24:00Z","updated_at":"2015-03-30T11:32:29Z","closed_at":null,"body":"If I retrieve an annotation set:\r\n\r\n```\r\nstain@biggie-utopic:~/src/annotopia/utopia-tests$ curl \"http://localhost:8080/s/annotationset/3B1DA1C4-0112-44A4-ACA1-C60D40B14C03?apiKey=$API\" > loop; \r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  1793    0  1793    0     0  22295      0 --:--:-- --:--:-- --:--:-- 22412\r\n```\r\n\r\n```\r\nstain@biggie-utopic:~/src/annotopia/utopia-tests$ cat loop \r\n{\r\n  \"@graph\" : [ {\r\n    \"@id\" : \"http://localhost:8080/s/annotation/F428F1FE-98EA-4F4B-A512-0601881611BC\",\r\n    \"@type\" : \"http://www.w3.org/ns/oa#Annotation\",\r\n    \"lastUpdateOn\" : \"2015-03-23T15:59:01+0000\",\r\n    \"previousVersion\" : \"3693262aeb4c99d83c829608f7fb5973\",\r\n    \"hasBody\" : \"http://localhost:8080/s/content/59212838-4B0C-49E5-ABC5-F04C2BEAD6CA\",\r\n    \"hasTarget\" : \"http://example.com/page5\"\r\n  }, {\r\n    \"@id\" : \"http://localhost:8080/s/annotationset/3B1DA1C4-0112-44A4-ACA1-C60D40B14C03\",\r\n    \"@type\" : \"http://purl.org/annotopia#AnnotationSet\",\r\n    \"annotations\" : \"http://localhost:8080/s/annotation/F428F1FE-98EA-4F4B-A512-0601881611BC\",\r\n    \"lastUpdateOn\" : \"2015-03-23T15:59:01+0000\",\r\n    \"previousVersion\" : \"blank\",\r\n    \"version\" : \"1\",\r\n    \"label\" : \"Utopia set\"\r\n  }, {\r\n    \"@id\" : \"http://localhost:8080/s/content/59212838-4B0C-49E5-ABC5-F04C2BEAD6CA\",\r\n    \"@type\" : [ \"http://purl.org/dc/dcmitype/Text\", \"http://www.w3.org/2011/content#ContentAsText\" ],\r\n    \"format\" : \"text/plain\",\r\n    \"previousVersion\" : \"blank\",\r\n    \"chars\" : \"this is another example for page 5\"\r\n  } ],\r\n  \"@id\" : \"urn:x-arq:DefaultGraphNode\",\r\n  \"@context\" : {\r\n    \"annotations\" : {\r\n      \"@id\" : \"http://purl.org/annotopia#annotations\",\r\n      \"@type\" : \"@id\"\r\n    },\r\n    \"lastUpdateOn\" : \"http://purl.org/pav/lastUpdateOn\",\r\n    \"previousVersion\" : \"http://purl.org/pav/previousVersion\",\r\n    \"version\" : \"http://purl.org/pav/version\",\r\n    \"label\" : \"http://www.w3.org/2000/01/rdf-schema#label\",\r\n    \"hasTarget\" : {\r\n      \"@id\" : \"http://www.w3.org/ns/oa#hasTarget\",\r\n      \"@type\" : \"@id\"\r\n    },\r\n    \"hasBody\" : {\r\n      \"@id\" : \"http://www.w3.org/ns/oa#hasBody\",\r\n      \"@type\" : \"@id\"\r\n    },\r\n    \"chars\" : \"http://www.w3.org/2011/content#chars\",\r\n    \"format\" : \"http://purl.org/dc/elements/1.1/format\"\r\n  }\r\n}\r\n```\r\n\r\nBut PUT-ing it back does not work, even if I add the `apiKey` URL parameter\r\n\r\n```\r\n\r\nstain@biggie-utopic:~/src/annotopia/utopia-tests$ curl -v -X PUT \"http://localhost:8080/s/annotationset/3B1De: application/json\" -d@loop4C03?apiKey=$API\" -H\"Content-Type\r\n* Hostname was NOT found in DNS cache\r\n*   Trying 127.0.0.1...\r\n* Connected to localhost (127.0.0.1) port 8080 (#0)\r\n> PUT /s/annotationset/3B1DA1C4-0112-44A4-ACA1-C60D40B14C03?apiKey=164bb0e0-248f-11e4-8c21-0800200c9a66 HTTP/1.1\r\n> User-Agent: curl/7.37.1\r\n> Host: localhost:8080\r\n> Accept: */*\r\n> Content-Type: application/json\r\n> Content-Length: 1749\r\n> Expect: 100-continue\r\n> \r\n< HTTP/1.1 100 Continue\r\n< HTTP/1.1 401 Unauthorized\r\n* Server Apache-Coyote/1.1 is not blacklisted\r\n< Server: Apache-Coyote/1.1\r\n< Content-Type: text/json;charset=UTF-8\r\n< Transfer-Encoding: chunked\r\n< Date: Mon, 23 Mar 2015 16:22:35 GMT\r\n* HTTP error before end of send, stop sending\r\n< \r\n* Closing connection 0\r\n{\"message\":\"Api Key missing or invalid\",\"status\":\"rejected\"}\r\n```\r\n\r\nAm I meant to edit the JSON-LD to add the apiKey there?  (that works, but ends up with 200 OK error message instead, see #12 )"},"comment":{"url":"https://api.github.com/repos/Annotopia/Annotopia/issues/comments/87640162","html_url":"https://github.com/Annotopia/Annotopia/issues/16#issuecomment-87640162","issue_url":"https://api.github.com/repos/Annotopia/Annotopia/issues/16","id":87640162,"user":{"login":"paolociccarese","id":798736,"avatar_url":"https://avatars.githubusercontent.com/u/798736?v=3","gravatar_id":"","url":"https://api.github.com/users/paolociccarese","html_url":"https://github.com/paolociccarese","followers_url":"https://api.github.com/users/paolociccarese/followers","following_url":"https://api.github.com/users/paolociccarese/following{/other_user}","gists_url":"https://api.github.com/users/paolociccarese/gists{/gist_id}","starred_url":"https://api.github.com/users/paolociccarese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paolociccarese/subscriptions","organizations_url":"https://api.github.com/users/paolociccarese/orgs","repos_url":"https://api.github.com/users/paolociccarese/repos","events_url":"https://api.github.com/users/paolociccarese/events{/privacy}","received_events_url":"https://api.github.com/users/paolociccarese/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T11:32:29Z","updated_at":"2015-03-30T11:32:29Z","body":"Also, I would create a brand new controller so that Domeo keeps working in\nthe meanwhile. Then we swap\nOn Mar 30, 2015 7:31 AM, \"Paolo Ciccarese\" <paolo.ciccarese@gmail.com>\nwrote:\n\n> The logic should keep the other annotations. Deletion is also a flag. The\n> deleted annotation is sent in for the server to detect it in storage and\n> wipe it out\n> On Mar 30, 2015 7:27 AM, \"Stian Soiland-Reyes\" <notifications@github.com>\n> wrote:\n>\n>> I think this functionality COULD be kept, but then as a PATCH or POST\n>> call. Also I need to investigate further what happens to the existing\n>> non-updated annotations..\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/Annotopia/Annotopia/issues/16#issuecomment-87639426>.\n>>\n>\n"}}