{"action":"created","comment":{"url":"https://api.github.com/repos/cyverse/DE/pulls/comments/64447487","id":64447487,"diff_hunk":"@@ -12,26 +13,29 @@\n \n     (GET* \"/avus\" [:as {uri :uri}]\n       :query [{:keys [user]} StandardUserQueryParams]\n-      :return AVUGetResult\n+      :return MetadataListing\n+      :middlewares [wrap-metadata-base-url]\n       :summary \"List AVUs (administrative)\"\n-      :description (str \"List iRODS AVUs associated with a data item. Include administrative/system AVUs.\"\n-(get-error-code-block \"ERR_NOT_A_USER, ERR_NOT_READABLE\"))\n+      :description\n+          (str \"List all AVUs associated with a data item. Include administrative/system iRODS AVUs.\"\n+(get-error-code-block \"ERR_NOT_A_USER, ERR_NOT_READABLE\")\n+(get-endpoint-delegate-block \"metadata\" \"GET /avus/{target-type}/{target-id}\"))\n       (svc/trap uri meta/admin-metadata-get data-id))\n \n-    (POST* \"/avus\" [:as {uri :uri}]\n+    (PUT* \"/avus\" [:as {uri :uri}]\n       :query [{:keys [user]} StandardUserQueryParams]\n-      :body [{:keys [irods-avus]} (describe AVUListing \"An list of AVUs to add\")]\n+      :body [{:keys [irods-avus]} (describe AVUListing \"A list of AVUs to add\")]\n       :return AVUChangeResult\n       :summary \"Add AVUs (administrative)\"\n-      :description (str \"Associate AVUs with a data item. Allow adding any AVU.\"\n+      :description (str \"Associate iRODS AVUs with a data item. Allow adding any AVU.\"\n (get-error-code-block \"ERR_NOT_A_USER, ERR_NOT_READABLE, ERR_DOES_NOT_EXIST, ERR_NOT_WRITEABLE, ERR_NOT_AUTHORIZED\"))\n       (svc/trap uri meta/admin-metadata-add data-id irods-avus))","path":"services/data-info/src/data_info/routes/avus.clj","position":null,"original_position":36,"commit_id":"33dde58e475accc4d16231bb705a0ed7168495d9","original_commit_id":"4aea72573f980d978f266ef63cdca61b1fb6a0ae","user":{"login":"ianmcorvidae","id":106004,"avatar_url":"https://avatars.githubusercontent.com/u/106004?v=3","gravatar_id":"","url":"https://api.github.com/users/ianmcorvidae","html_url":"https://github.com/ianmcorvidae","followers_url":"https://api.github.com/users/ianmcorvidae/followers","following_url":"https://api.github.com/users/ianmcorvidae/following{/other_user}","gists_url":"https://api.github.com/users/ianmcorvidae/gists{/gist_id}","starred_url":"https://api.github.com/users/ianmcorvidae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianmcorvidae/subscriptions","organizations_url":"https://api.github.com/users/ianmcorvidae/orgs","repos_url":"https://api.github.com/users/ianmcorvidae/repos","events_url":"https://api.github.com/users/ianmcorvidae/events{/privacy}","received_events_url":"https://api.github.com/users/ianmcorvidae/received_events","type":"User","site_admin":false},"body":"I don't have strong feelings about PATCH, ultimately. I don't like it because there doesn't seem to be much of a consensus, so I tend to be conservative and use POST instead, but I wouldn't be opposed to using it either (my complaints are more aesthetic than practical). The point about deletes was mostly just because that's how I tend to think about PATCH, but nobody seems to really agree on PATCH, so it's not a requirement, just a feeling! Sorry I wasn't that clear about that.\r\n\r\nMostly, the only thing that is clearly wrong to me is using PUT for something which does not send an entire resource representation (the whole list) at once, which I think you agree on.\r\n\r\nAs for the rest: since we want the same URI, they can't both be POST. I think PUT is clear enough/idempotent enough to be used for the set endpoint (which is what most things in our code, and externally from what I've seen, use PUT for). POST would also be basically \"fine\" for the set endpoint, but it's sort of a cop-out on using HTTP verbs to denote semantics. I don't have a strong opinion about whether the add/update should be POST or PATCH, though I'd choose POST by the conservatism arguments I list above and because I prefer PUT for the set endpoint it's available.\r\n\r\nBasically, I put these into data-info as PUT for set and POST for add+update because that's my preference, but the only arrangement that I see as definitely wrong is using PUT for add+update. set/add as PUT/POST, POST/PATCH, and PUT/PATCH all seem, if not perfect, at least not wrong. PUT/PATCH is probably the most correct, where PUT/POST is the most if you exclude PATCH due to ill-definedness like I tend to.","created_at":"2016-05-24T18:23:05Z","updated_at":"2016-05-24T18:23:05Z","html_url":"https://github.com/cyverse/DE/pull/196#discussion_r64447487","pull_request_url":"https://api.github.com/repos/cyverse/DE/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/cyverse/DE/pulls/comments/64447487"},"html":{"href":"https://github.com/cyverse/DE/pull/196#discussion_r64447487"},"pull_request":{"href":"https://api.github.com/repos/cyverse/DE/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/cyverse/DE/pulls/196","id":71134935,"html_url":"https://github.com/cyverse/DE/pull/196","diff_url":"https://github.com/cyverse/DE/pull/196.diff","patch_url":"https://github.com/cyverse/DE/pull/196.patch","issue_url":"https://api.github.com/repos/cyverse/DE/issues/196","number":196,"state":"open","locked":false,"title":"Remove template and template_id references from metadata AVU endpoints","user":{"login":"psarando","id":996408,"avatar_url":"https://avatars.githubusercontent.com/u/996408?v=3","gravatar_id":"","url":"https://api.github.com/users/psarando","html_url":"https://github.com/psarando","followers_url":"https://api.github.com/users/psarando/followers","following_url":"https://api.github.com/users/psarando/following{/other_user}","gists_url":"https://api.github.com/users/psarando/gists{/gist_id}","starred_url":"https://api.github.com/users/psarando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psarando/subscriptions","organizations_url":"https://api.github.com/users/psarando/orgs","repos_url":"https://api.github.com/users/psarando/repos","events_url":"https://api.github.com/users/psarando/events{/privacy}","received_events_url":"https://api.github.com/users/psarando/received_events","type":"User","site_admin":false},"body":"These changes remove the metadata service `/filesystem/data/:id/avus` endpoints (or rename them to `/avus/:type/:id` versions) and update terrain and data-info services to use the new `/avus/:type/:id` endpoints added by PR #171.\r\nSo metadata AVUs added to data items are no longer tied to template instances.\r\nA new `metadata-client` library has been added for use by both the apps and data-info services.\r\n\r\nAdditionally, almost all coordination of data-info and metadata service endpoints has been migrated into the data-info service (with the exception of the csv-parser endpoint).","created_at":"2016-05-23T23:08:24Z","updated_at":"2016-05-24T18:23:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c91b7cac8fd96ddb73669c47602de0a3d06a5e40","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cyverse/DE/pulls/196/commits","review_comments_url":"https://api.github.com/repos/cyverse/DE/pulls/196/comments","review_comment_url":"https://api.github.com/repos/cyverse/DE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cyverse/DE/issues/196/comments","statuses_url":"https://api.github.com/repos/cyverse/DE/statuses/33dde58e475accc4d16231bb705a0ed7168495d9","head":{"label":"cyverse:CORE-7619","ref":"CORE-7619","sha":"33dde58e475accc4d16231bb705a0ed7168495d9","user":{"login":"cyverse","id":15638129,"avatar_url":"https://avatars.githubusercontent.com/u/15638129?v=3","gravatar_id":"","url":"https://api.github.com/users/cyverse","html_url":"https://github.com/cyverse","followers_url":"https://api.github.com/users/cyverse/followers","following_url":"https://api.github.com/users/cyverse/following{/other_user}","gists_url":"https://api.github.com/users/cyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/cyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyverse/subscriptions","organizations_url":"https://api.github.com/users/cyverse/orgs","repos_url":"https://api.github.com/users/cyverse/repos","events_url":"https://api.github.com/users/cyverse/events{/privacy}","received_events_url":"https://api.github.com/users/cyverse/received_events","type":"Organization","site_admin":false},"repo":{"id":45433519,"name":"DE","full_name":"cyverse/DE","owner":{"login":"cyverse","id":15638129,"avatar_url":"https://avatars.githubusercontent.com/u/15638129?v=3","gravatar_id":"","url":"https://api.github.com/users/cyverse","html_url":"https://github.com/cyverse","followers_url":"https://api.github.com/users/cyverse/followers","following_url":"https://api.github.com/users/cyverse/following{/other_user}","gists_url":"https://api.github.com/users/cyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/cyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyverse/subscriptions","organizations_url":"https://api.github.com/users/cyverse/orgs","repos_url":"https://api.github.com/users/cyverse/repos","events_url":"https://api.github.com/users/cyverse/events{/privacy}","received_events_url":"https://api.github.com/users/cyverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cyverse/DE","description":"The CyVerse Discovery Environment","fork":false,"url":"https://api.github.com/repos/cyverse/DE","forks_url":"https://api.github.com/repos/cyverse/DE/forks","keys_url":"https://api.github.com/repos/cyverse/DE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyverse/DE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyverse/DE/teams","hooks_url":"https://api.github.com/repos/cyverse/DE/hooks","issue_events_url":"https://api.github.com/repos/cyverse/DE/issues/events{/number}","events_url":"https://api.github.com/repos/cyverse/DE/events","assignees_url":"https://api.github.com/repos/cyverse/DE/assignees{/user}","branches_url":"https://api.github.com/repos/cyverse/DE/branches{/branch}","tags_url":"https://api.github.com/repos/cyverse/DE/tags","blobs_url":"https://api.github.com/repos/cyverse/DE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyverse/DE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyverse/DE/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyverse/DE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyverse/DE/statuses/{sha}","languages_url":"https://api.github.com/repos/cyverse/DE/languages","stargazers_url":"https://api.github.com/repos/cyverse/DE/stargazers","contributors_url":"https://api.github.com/repos/cyverse/DE/contributors","subscribers_url":"https://api.github.com/repos/cyverse/DE/subscribers","subscription_url":"https://api.github.com/repos/cyverse/DE/subscription","commits_url":"https://api.github.com/repos/cyverse/DE/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyverse/DE/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyverse/DE/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyverse/DE/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyverse/DE/contents/{+path}","compare_url":"https://api.github.com/repos/cyverse/DE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyverse/DE/merges","archive_url":"https://api.github.com/repos/cyverse/DE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyverse/DE/downloads","issues_url":"https://api.github.com/repos/cyverse/DE/issues{/number}","pulls_url":"https://api.github.com/repos/cyverse/DE/pulls{/number}","milestones_url":"https://api.github.com/repos/cyverse/DE/milestones{/number}","notifications_url":"https://api.github.com/repos/cyverse/DE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyverse/DE/labels{/name}","releases_url":"https://api.github.com/repos/cyverse/DE/releases{/id}","deployments_url":"https://api.github.com/repos/cyverse/DE/deployments","created_at":"2015-11-03T01:27:41Z","updated_at":"2016-03-05T02:16:59Z","pushed_at":"2016-05-24T17:58:53Z","git_url":"git://github.com/cyverse/DE.git","ssh_url":"git@github.com:cyverse/DE.git","clone_url":"https://github.com/cyverse/DE.git","svn_url":"https://github.com/cyverse/DE","homepage":"https://de.iplantcollaborative.org/de/","size":41987,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":4,"default_branch":"master"}},"base":{"label":"cyverse:dev","ref":"dev","sha":"095e0db7683b17c7082635dcb15a58d28e2875d0","user":{"login":"cyverse","id":15638129,"avatar_url":"https://avatars.githubusercontent.com/u/15638129?v=3","gravatar_id":"","url":"https://api.github.com/users/cyverse","html_url":"https://github.com/cyverse","followers_url":"https://api.github.com/users/cyverse/followers","following_url":"https://api.github.com/users/cyverse/following{/other_user}","gists_url":"https://api.github.com/users/cyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/cyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyverse/subscriptions","organizations_url":"https://api.github.com/users/cyverse/orgs","repos_url":"https://api.github.com/users/cyverse/repos","events_url":"https://api.github.com/users/cyverse/events{/privacy}","received_events_url":"https://api.github.com/users/cyverse/received_events","type":"Organization","site_admin":false},"repo":{"id":45433519,"name":"DE","full_name":"cyverse/DE","owner":{"login":"cyverse","id":15638129,"avatar_url":"https://avatars.githubusercontent.com/u/15638129?v=3","gravatar_id":"","url":"https://api.github.com/users/cyverse","html_url":"https://github.com/cyverse","followers_url":"https://api.github.com/users/cyverse/followers","following_url":"https://api.github.com/users/cyverse/following{/other_user}","gists_url":"https://api.github.com/users/cyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/cyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyverse/subscriptions","organizations_url":"https://api.github.com/users/cyverse/orgs","repos_url":"https://api.github.com/users/cyverse/repos","events_url":"https://api.github.com/users/cyverse/events{/privacy}","received_events_url":"https://api.github.com/users/cyverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cyverse/DE","description":"The CyVerse Discovery Environment","fork":false,"url":"https://api.github.com/repos/cyverse/DE","forks_url":"https://api.github.com/repos/cyverse/DE/forks","keys_url":"https://api.github.com/repos/cyverse/DE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cyverse/DE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cyverse/DE/teams","hooks_url":"https://api.github.com/repos/cyverse/DE/hooks","issue_events_url":"https://api.github.com/repos/cyverse/DE/issues/events{/number}","events_url":"https://api.github.com/repos/cyverse/DE/events","assignees_url":"https://api.github.com/repos/cyverse/DE/assignees{/user}","branches_url":"https://api.github.com/repos/cyverse/DE/branches{/branch}","tags_url":"https://api.github.com/repos/cyverse/DE/tags","blobs_url":"https://api.github.com/repos/cyverse/DE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cyverse/DE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cyverse/DE/git/refs{/sha}","trees_url":"https://api.github.com/repos/cyverse/DE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cyverse/DE/statuses/{sha}","languages_url":"https://api.github.com/repos/cyverse/DE/languages","stargazers_url":"https://api.github.com/repos/cyverse/DE/stargazers","contributors_url":"https://api.github.com/repos/cyverse/DE/contributors","subscribers_url":"https://api.github.com/repos/cyverse/DE/subscribers","subscription_url":"https://api.github.com/repos/cyverse/DE/subscription","commits_url":"https://api.github.com/repos/cyverse/DE/commits{/sha}","git_commits_url":"https://api.github.com/repos/cyverse/DE/git/commits{/sha}","comments_url":"https://api.github.com/repos/cyverse/DE/comments{/number}","issue_comment_url":"https://api.github.com/repos/cyverse/DE/issues/comments{/number}","contents_url":"https://api.github.com/repos/cyverse/DE/contents/{+path}","compare_url":"https://api.github.com/repos/cyverse/DE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cyverse/DE/merges","archive_url":"https://api.github.com/repos/cyverse/DE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cyverse/DE/downloads","issues_url":"https://api.github.com/repos/cyverse/DE/issues{/number}","pulls_url":"https://api.github.com/repos/cyverse/DE/pulls{/number}","milestones_url":"https://api.github.com/repos/cyverse/DE/milestones{/number}","notifications_url":"https://api.github.com/repos/cyverse/DE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cyverse/DE/labels{/name}","releases_url":"https://api.github.com/repos/cyverse/DE/releases{/id}","deployments_url":"https://api.github.com/repos/cyverse/DE/deployments","created_at":"2015-11-03T01:27:41Z","updated_at":"2016-03-05T02:16:59Z","pushed_at":"2016-05-24T17:58:53Z","git_url":"git://github.com/cyverse/DE.git","ssh_url":"git@github.com:cyverse/DE.git","clone_url":"https://github.com/cyverse/DE.git","svn_url":"https://github.com/cyverse/DE","homepage":"https://de.iplantcollaborative.org/de/","size":41987,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cyverse/DE/pulls/196"},"html":{"href":"https://github.com/cyverse/DE/pull/196"},"issue":{"href":"https://api.github.com/repos/cyverse/DE/issues/196"},"comments":{"href":"https://api.github.com/repos/cyverse/DE/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/cyverse/DE/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/cyverse/DE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cyverse/DE/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/cyverse/DE/statuses/33dde58e475accc4d16231bb705a0ed7168495d9"}}}}
{"actor":{"display_login":"ianmcorvidae"}}