{"action":"closed","number":3619,"pull_request":{"url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/3619","id":198420325,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDIwMzI1","html_url":"https://github.com/freedomofpress/securedrop/pull/3619","diff_url":"https://github.com/freedomofpress/securedrop/pull/3619.diff","patch_url":"https://github.com/freedomofpress/securedrop/pull/3619.patch","issue_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/3619","number":3619,"state":"closed","locked":false,"title":"Add journalist interface API","user":{"login":"redshiftzero","id":7832803,"node_id":"MDQ6VXNlcjc4MzI4MDM=","avatar_url":"https://avatars3.githubusercontent.com/u/7832803?v=4","gravatar_id":"","url":"https://api.github.com/users/redshiftzero","html_url":"https://github.com/redshiftzero","followers_url":"https://api.github.com/users/redshiftzero/followers","following_url":"https://api.github.com/users/redshiftzero/following{/other_user}","gists_url":"https://api.github.com/users/redshiftzero/gists{/gist_id}","starred_url":"https://api.github.com/users/redshiftzero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redshiftzero/subscriptions","organizations_url":"https://api.github.com/users/redshiftzero/orgs","repos_url":"https://api.github.com/users/redshiftzero/repos","events_url":"https://api.github.com/users/redshiftzero/events{/privacy}","received_events_url":"https://api.github.com/users/redshiftzero/received_events","type":"User","site_admin":false},"body":"## Status\r\n\r\nReady for review\r\n\r\n## Description of Changes\r\n\r\nFixes #1761\r\n\r\nChanges proposed in this pull request:\r\n - add initial journalist interface API. Note that the API has changed somewhat from what was initially proposed in #1761, the canonical reference point is the docs in bdcd4ba\r\n\r\n* Endpoints that are not represented here are imho “nice to haves” and I propose we slowly add them in followup issues as needed. My rationale here is: 1. they are not needed for an initial client program and 2. The functionality currently available via this API already unblocks developers at news orgs to implement custom functionality. Adding endpoints without modifying existing functionality also means we do not need to increment the API version\r\n\r\n## Testing\r\n\r\n- Follow the docs in this branch and try to use the API. From the perspective of a user consuming this API, is anything not intuitive or could be clearer (in the docs or in the API responses itself)? \r\n\r\n- Are there endpoints that are important for an initial API that are not here? \r\n\r\n- Are there error cases that are not gracefully handled? Apologies for the lack of detailed test plan here, but exploratory testing / attempts to break this is really what this needs.\r\n\r\n- Are there security improvements that should be made?\r\n\r\n### Test database migrations\r\n\r\n1. Provision staging VMs on develop:\r\n\r\n```\r\ngit checkout develop\r\nmake build-debs\r\nvagrant up /staging/\r\n```\r\n\r\n2. Now add a source by submitting a document via the source interface.\r\n3. Now upgrade:\r\n\r\n```\r\ngit checkout journalist-api-0.9.0\r\nmake build-debs\r\nvagrant provision /staging/\r\n```\r\n\r\nThe database migrations should occur without issue and you should be able to use the API (or direct database access) to verify the UUID on the source and submission now exist. \r\n\r\n## Deployment\r\n\r\nWill be deployed in `securedrop-app-code` package\r\n\r\n## Checklist\r\n\r\n### If you made non-trivial code changes:\r\n\r\n- [x] I have written a test plan and validated it for this PR\r\n\r\n### If you made changes to documentation:\r\n\r\n- [x] Doc linting (`make docs-lint`) passed locally\r\n","created_at":"2018-06-29T20:45:17Z","updated_at":"2018-07-24T17:16:01Z","closed_at":"2018-07-24T17:16:01Z","merged_at":"2018-07-24T17:16:01Z","merge_commit_sha":"31ddec88c03bc6ef3f8ef24e8cc1798b4c4e67be","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dachary","id":433594,"node_id":"MDQ6VXNlcjQzMzU5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/433594?v=4","gravatar_id":"","url":"https://api.github.com/users/dachary","html_url":"https://github.com/dachary","followers_url":"https://api.github.com/users/dachary/followers","following_url":"https://api.github.com/users/dachary/following{/other_user}","gists_url":"https://api.github.com/users/dachary/gists{/gist_id}","starred_url":"https://api.github.com/users/dachary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dachary/subscriptions","organizations_url":"https://api.github.com/users/dachary/orgs","repos_url":"https://api.github.com/users/dachary/repos","events_url":"https://api.github.com/users/dachary/events{/privacy}","received_events_url":"https://api.github.com/users/dachary/received_events","type":"User","site_admin":false},{"login":"conorsch","id":657862,"node_id":"MDQ6VXNlcjY1Nzg2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/657862?v=4","gravatar_id":"","url":"https://api.github.com/users/conorsch","html_url":"https://github.com/conorsch","followers_url":"https://api.github.com/users/conorsch/followers","following_url":"https://api.github.com/users/conorsch/following{/other_user}","gists_url":"https://api.github.com/users/conorsch/gists{/gist_id}","starred_url":"https://api.github.com/users/conorsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorsch/subscriptions","organizations_url":"https://api.github.com/users/conorsch/orgs","repos_url":"https://api.github.com/users/conorsch/repos","events_url":"https://api.github.com/users/conorsch/events{/privacy}","received_events_url":"https://api.github.com/users/conorsch/received_events","type":"User","site_admin":false},{"login":"msheiny","id":1727935,"node_id":"MDQ6VXNlcjE3Mjc5MzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1727935?v=4","gravatar_id":"","url":"https://api.github.com/users/msheiny","html_url":"https://github.com/msheiny","followers_url":"https://api.github.com/users/msheiny/followers","following_url":"https://api.github.com/users/msheiny/following{/other_user}","gists_url":"https://api.github.com/users/msheiny/gists{/gist_id}","starred_url":"https://api.github.com/users/msheiny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msheiny/subscriptions","organizations_url":"https://api.github.com/users/msheiny/orgs","repos_url":"https://api.github.com/users/msheiny/repos","events_url":"https://api.github.com/users/msheiny/events{/privacy}","received_events_url":"https://api.github.com/users/msheiny/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/3619/commits","review_comments_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/3619/comments","review_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/3619/comments","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/e42c7f1844aaebfbf93904d8345ba5b6fae7a654","head":{"label":"freedomofpress:journalist-api-0.9.0","ref":"journalist-api-0.9.0","sha":"e42c7f1844aaebfbf93904d8345ba5b6fae7a654","user":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"repo":{"id":3156820,"node_id":"MDEwOlJlcG9zaXRvcnkzMTU2ODIw","name":"securedrop","full_name":"freedomofpress/securedrop","owner":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freedomofpress/securedrop","description":"GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!","fork":false,"url":"https://api.github.com/repos/freedomofpress/securedrop","forks_url":"https://api.github.com/repos/freedomofpress/securedrop/forks","keys_url":"https://api.github.com/repos/freedomofpress/securedrop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freedomofpress/securedrop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freedomofpress/securedrop/teams","hooks_url":"https://api.github.com/repos/freedomofpress/securedrop/hooks","issue_events_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/events{/number}","events_url":"https://api.github.com/repos/freedomofpress/securedrop/events","assignees_url":"https://api.github.com/repos/freedomofpress/securedrop/assignees{/user}","branches_url":"https://api.github.com/repos/freedomofpress/securedrop/branches{/branch}","tags_url":"https://api.github.com/repos/freedomofpress/securedrop/tags","blobs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freedomofpress/securedrop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/refs{/sha}","trees_url":"https://api.github.com/repos/freedomofpress/securedrop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/{sha}","languages_url":"https://api.github.com/repos/freedomofpress/securedrop/languages","stargazers_url":"https://api.github.com/repos/freedomofpress/securedrop/stargazers","contributors_url":"https://api.github.com/repos/freedomofpress/securedrop/contributors","subscribers_url":"https://api.github.com/repos/freedomofpress/securedrop/subscribers","subscription_url":"https://api.github.com/repos/freedomofpress/securedrop/subscription","commits_url":"https://api.github.com/repos/freedomofpress/securedrop/commits{/sha}","git_commits_url":"https://api.github.com/repos/freedomofpress/securedrop/git/commits{/sha}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/comments{/number}","issue_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/comments{/number}","contents_url":"https://api.github.com/repos/freedomofpress/securedrop/contents/{+path}","compare_url":"https://api.github.com/repos/freedomofpress/securedrop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freedomofpress/securedrop/merges","archive_url":"https://api.github.com/repos/freedomofpress/securedrop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freedomofpress/securedrop/downloads","issues_url":"https://api.github.com/repos/freedomofpress/securedrop/issues{/number}","pulls_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls{/number}","milestones_url":"https://api.github.com/repos/freedomofpress/securedrop/milestones{/number}","notifications_url":"https://api.github.com/repos/freedomofpress/securedrop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freedomofpress/securedrop/labels{/name}","releases_url":"https://api.github.com/repos/freedomofpress/securedrop/releases{/id}","deployments_url":"https://api.github.com/repos/freedomofpress/securedrop/deployments","created_at":"2012-01-11T19:57:55Z","updated_at":"2018-07-24T15:24:11Z","pushed_at":"2018-07-24T17:16:01Z","git_url":"git://github.com/freedomofpress/securedrop.git","ssh_url":"git@github.com:freedomofpress/securedrop.git","clone_url":"https://github.com/freedomofpress/securedrop.git","svn_url":"https://github.com/freedomofpress/securedrop","homepage":"https://securedrop.org/","size":72745,"stargazers_count":2436,"watchers_count":2436,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":480,"mirror_url":null,"archived":false,"open_issues_count":393,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":480,"open_issues":393,"watchers":2436,"default_branch":"develop"}},"base":{"label":"freedomofpress:develop","ref":"develop","sha":"5fb212744a7cb93cd1d0bf842ad3a37fcafa92ba","user":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"repo":{"id":3156820,"node_id":"MDEwOlJlcG9zaXRvcnkzMTU2ODIw","name":"securedrop","full_name":"freedomofpress/securedrop","owner":{"login":"freedomofpress","id":5388147,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODgxNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5388147?v=4","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freedomofpress/securedrop","description":"GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!","fork":false,"url":"https://api.github.com/repos/freedomofpress/securedrop","forks_url":"https://api.github.com/repos/freedomofpress/securedrop/forks","keys_url":"https://api.github.com/repos/freedomofpress/securedrop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freedomofpress/securedrop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freedomofpress/securedrop/teams","hooks_url":"https://api.github.com/repos/freedomofpress/securedrop/hooks","issue_events_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/events{/number}","events_url":"https://api.github.com/repos/freedomofpress/securedrop/events","assignees_url":"https://api.github.com/repos/freedomofpress/securedrop/assignees{/user}","branches_url":"https://api.github.com/repos/freedomofpress/securedrop/branches{/branch}","tags_url":"https://api.github.com/repos/freedomofpress/securedrop/tags","blobs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freedomofpress/securedrop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/refs{/sha}","trees_url":"https://api.github.com/repos/freedomofpress/securedrop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/{sha}","languages_url":"https://api.github.com/repos/freedomofpress/securedrop/languages","stargazers_url":"https://api.github.com/repos/freedomofpress/securedrop/stargazers","contributors_url":"https://api.github.com/repos/freedomofpress/securedrop/contributors","subscribers_url":"https://api.github.com/repos/freedomofpress/securedrop/subscribers","subscription_url":"https://api.github.com/repos/freedomofpress/securedrop/subscription","commits_url":"https://api.github.com/repos/freedomofpress/securedrop/commits{/sha}","git_commits_url":"https://api.github.com/repos/freedomofpress/securedrop/git/commits{/sha}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/comments{/number}","issue_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/comments{/number}","contents_url":"https://api.github.com/repos/freedomofpress/securedrop/contents/{+path}","compare_url":"https://api.github.com/repos/freedomofpress/securedrop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freedomofpress/securedrop/merges","archive_url":"https://api.github.com/repos/freedomofpress/securedrop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freedomofpress/securedrop/downloads","issues_url":"https://api.github.com/repos/freedomofpress/securedrop/issues{/number}","pulls_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls{/number}","milestones_url":"https://api.github.com/repos/freedomofpress/securedrop/milestones{/number}","notifications_url":"https://api.github.com/repos/freedomofpress/securedrop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freedomofpress/securedrop/labels{/name}","releases_url":"https://api.github.com/repos/freedomofpress/securedrop/releases{/id}","deployments_url":"https://api.github.com/repos/freedomofpress/securedrop/deployments","created_at":"2012-01-11T19:57:55Z","updated_at":"2018-07-24T15:24:11Z","pushed_at":"2018-07-24T17:16:01Z","git_url":"git://github.com/freedomofpress/securedrop.git","ssh_url":"git@github.com:freedomofpress/securedrop.git","clone_url":"https://github.com/freedomofpress/securedrop.git","svn_url":"https://github.com/freedomofpress/securedrop","homepage":"https://securedrop.org/","size":72745,"stargazers_count":2436,"watchers_count":2436,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":480,"mirror_url":null,"archived":false,"open_issues_count":393,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":480,"open_issues":393,"watchers":2436,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/3619"},"html":{"href":"https://github.com/freedomofpress/securedrop/pull/3619"},"issue":{"href":"https://api.github.com/repos/freedomofpress/securedrop/issues/3619"},"comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop/issues/3619/comments"},"review_comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/3619/comments"},"review_comment":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/3619/commits"},"statuses":{"href":"https://api.github.com/repos/freedomofpress/securedrop/statuses/e42c7f1844aaebfbf93904d8345ba5b6fae7a654"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"emkll","id":15223328,"node_id":"MDQ6VXNlcjE1MjIzMzI4","avatar_url":"https://avatars2.githubusercontent.com/u/15223328?v=4","gravatar_id":"","url":"https://api.github.com/users/emkll","html_url":"https://github.com/emkll","followers_url":"https://api.github.com/users/emkll/followers","following_url":"https://api.github.com/users/emkll/following{/other_user}","gists_url":"https://api.github.com/users/emkll/gists{/gist_id}","starred_url":"https://api.github.com/users/emkll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emkll/subscriptions","organizations_url":"https://api.github.com/users/emkll/orgs","repos_url":"https://api.github.com/users/emkll/repos","events_url":"https://api.github.com/users/emkll/events{/privacy}","received_events_url":"https://api.github.com/users/emkll/received_events","type":"User","site_admin":false},"comments":20,"review_comments":90,"maintainer_can_modify":false,"commits":71,"additions":1977,"deletions":35,"changed_files":21}}
{"actor":{"display_login":"emkll"}}