{"action":"created","comment":{"url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments/23812426","id":23812426,"diff_hunk":"@@ -769,3 +771,57 @@ def _attempt_package_request_event(self, package, request_info, event_type, even\n             status_code = 200\n \n         return (status_code, response)\n+\n+    @_custom_endpoint(expected_methods=['get'])\n+    def package_contents(self, request, bundle, **kwargs):\n+        response = {\n+            \"success\": True,\n+            \"package\": bundle.obj.uuid,\n+            \"files\": []\n+        }\n+\n+        for f in bundle.obj.file_set.all():\n+            response[\"files\"].append({attr: getattr(f, attr) for attr in ('source_id', 'name', 'source_package', 'checksum', 'accessionid', 'origin')})\n+\n+        return http.HttpResponse(status=200, content=json.dumps(response),\n+            content_type='application/json')\n+\n+    def file_data(self, request, **kwargs):","path":"storage_service/locations/api/resources.py","position":28,"original_position":28,"commit_id":"ae30f61254ef3e7224bf132438646c3edc4764bd","original_commit_id":"ae30f61254ef3e7224bf132438646c3edc4764bd","user":{"login":"Hwesta","id":3166226,"avatar_url":"https://avatars.githubusercontent.com/u/3166226?v=3","gravatar_id":"","url":"https://api.github.com/users/Hwesta","html_url":"https://github.com/Hwesta","followers_url":"https://api.github.com/users/Hwesta/followers","following_url":"https://api.github.com/users/Hwesta/following{/other_user}","gists_url":"https://api.github.com/users/Hwesta/gists{/gist_id}","starred_url":"https://api.github.com/users/Hwesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hwesta/subscriptions","organizations_url":"https://api.github.com/users/Hwesta/orgs","repos_url":"https://api.github.com/users/Hwesta/repos","events_url":"https://api.github.com/users/Hwesta/events{/privacy}","received_events_url":"https://api.github.com/users/Hwesta/received_events","type":"User","site_admin":false},"body":"Docstrings for these? I know we don't have them on other functions, but they sure are nice.","created_at":"2015-01-29T23:23:04Z","updated_at":"2015-01-29T23:23:04Z","html_url":"https://github.com/artefactual/archivematica-storage-service/pull/59#discussion_r23812426","pull_request_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59","_links":{"self":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments/23812426"},"html":{"href":"https://github.com/artefactual/archivematica-storage-service/pull/59#discussion_r23812426"},"pull_request":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59","id":27955254,"html_url":"https://github.com/artefactual/archivematica-storage-service/pull/59","diff_url":"https://github.com/artefactual/archivematica-storage-service/pull/59.diff","patch_url":"https://github.com/artefactual/archivematica-storage-service/pull/59.patch","issue_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/59","number":59,"state":"open","locked":false,"title":"Track file metadata from transfer METS when sending to transfer backlog","user":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":false},"body":"In artefactual/archivematica#153, the transfer METS has been augmented with additional metadata about the transfer and files, providing the information that ES also carries about them. This improves the File model to add the appropriate fields to store that metadata, then provides new endpoints to\r\n\r\na) List all files in a package, with their metadata;\r\nb) Query for file metadata using the same names as in the transferfile ES index.\r\n\r\nThe latter can be used by Archivematica to look up specific records via absolute values from the SS, instead of querying the ES index.","created_at":"2015-01-23T21:04:33Z","updated_at":"2015-01-29T23:23:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f871d5c3b0244cbf9f4c1bad9ef667ba40aa4cc0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59/commits","review_comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59/comments","review_comment_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments/{number}","comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/59/comments","statuses_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/ae30f61254ef3e7224bf132438646c3edc4764bd","head":{"label":"artefactual:dev/issue-7714-file_model","ref":"dev/issue-7714-file_model","sha":"ae30f61254ef3e7224bf132438646c3edc4764bd","user":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"repo":{"id":12164369,"name":"archivematica-storage-service","full_name":"artefactual/archivematica-storage-service","owner":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual/archivematica-storage-service","description":"Archivematica storage service","fork":false,"url":"https://api.github.com/repos/artefactual/archivematica-storage-service","forks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/forks","keys_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/teams","hooks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/hooks","issue_events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/events","assignees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/tags","blobs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/languages","stargazers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/stargazers","contributors_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contributors","subscribers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscribers","subscription_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscription","commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/comments/{number}","contents_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/merges","archive_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/downloads","issues_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/labels{/name}","releases_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/releases{/id}","created_at":"2013-08-16T17:41:44Z","updated_at":"2014-12-08T22:43:24Z","pushed_at":"2015-01-29T20:47:51Z","git_url":"git://github.com/artefactual/archivematica-storage-service.git","ssh_url":"git@github.com:artefactual/archivematica-storage-service.git","clone_url":"https://github.com/artefactual/archivematica-storage-service.git","svn_url":"https://github.com/artefactual/archivematica-storage-service","homepage":"http://www.archivematica.org","size":4966,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":2,"default_branch":"stable/0.5.x"}},"base":{"label":"artefactual:qa/0.x","ref":"qa/0.x","sha":"eda4189783dd78b7ddd30cfa6470cd7f890eee1e","user":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"repo":{"id":12164369,"name":"archivematica-storage-service","full_name":"artefactual/archivematica-storage-service","owner":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual/archivematica-storage-service","description":"Archivematica storage service","fork":false,"url":"https://api.github.com/repos/artefactual/archivematica-storage-service","forks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/forks","keys_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/teams","hooks_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/hooks","issue_events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/events","assignees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/tags","blobs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/languages","stargazers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/stargazers","contributors_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contributors","subscribers_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscribers","subscription_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/subscription","commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/comments/{number}","contents_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/merges","archive_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/downloads","issues_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/labels{/name}","releases_url":"https://api.github.com/repos/artefactual/archivematica-storage-service/releases{/id}","created_at":"2013-08-16T17:41:44Z","updated_at":"2014-12-08T22:43:24Z","pushed_at":"2015-01-29T20:47:51Z","git_url":"git://github.com/artefactual/archivematica-storage-service.git","ssh_url":"git@github.com:artefactual/archivematica-storage-service.git","clone_url":"https://github.com/artefactual/archivematica-storage-service.git","svn_url":"https://github.com/artefactual/archivematica-storage-service","homepage":"http://www.archivematica.org","size":4966,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":2,"default_branch":"stable/0.5.x"}},"_links":{"self":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59"},"html":{"href":"https://github.com/artefactual/archivematica-storage-service/pull/59"},"issue":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/59"},"comments":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/artefactual/archivematica-storage-service/statuses/ae30f61254ef3e7224bf132438646c3edc4764bd"}}}}