{"action":"closed","number":33,"pull_request":{"url":"https://api.github.com/repos/open-policy-agent/opa/pulls/33","id":70068284,"html_url":"https://github.com/open-policy-agent/opa/pull/33","diff_url":"https://github.com/open-policy-agent/opa/pull/33.diff","patch_url":"https://github.com/open-policy-agent/opa/pull/33.patch","issue_url":"https://api.github.com/repos/open-policy-agent/opa/issues/33","number":33,"state":"closed","locked":false,"title":"Add basic REST API support","user":{"login":"tsandall","id":238885,"avatar_url":"https://avatars.githubusercontent.com/u/238885?v=3","gravatar_id":"","url":"https://api.github.com/users/tsandall","html_url":"https://github.com/tsandall","followers_url":"https://api.github.com/users/tsandall/followers","following_url":"https://api.github.com/users/tsandall/following{/other_user}","gists_url":"https://api.github.com/users/tsandall/gists{/gist_id}","starred_url":"https://api.github.com/users/tsandall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsandall/subscriptions","organizations_url":"https://api.github.com/users/tsandall/orgs","repos_url":"https://api.github.com/users/tsandall/repos","events_url":"https://api.github.com/users/tsandall/events{/privacy}","received_events_url":"https://api.github.com/users/tsandall/received_events","type":"User","site_admin":false},"body":"This PR adds basic REST API support.\r\n\r\nOne note about this PR:\r\n\r\n- For now, PolicyStore doesn’t rollback failed add/remove operations. E.g,. if a remove operation fails to delete the persisted definition, it will not rollback the removal of rules from the data store. As a result, add/remove are both made to be idempotent. Until we have transaction support in the data store, callers can just retry their add/remove operations in presence of failure (or restart OPA and clean the —policy-dir if necessary).\r\n\r\nEDIT: Removed previous comments as they've been addressed in the latest commits.","created_at":"2016-05-13T22:41:11Z","updated_at":"2016-05-17T17:02:49Z","closed_at":"2016-05-17T17:02:48Z","merged_at":"2016-05-17T17:02:48Z","merge_commit_sha":"9a2fa09c841de4fe0a04e9cc3c7c21337b7e36af","assignee":{"login":"timothyhinrichs","id":10049579,"avatar_url":"https://avatars.githubusercontent.com/u/10049579?v=3","gravatar_id":"","url":"https://api.github.com/users/timothyhinrichs","html_url":"https://github.com/timothyhinrichs","followers_url":"https://api.github.com/users/timothyhinrichs/followers","following_url":"https://api.github.com/users/timothyhinrichs/following{/other_user}","gists_url":"https://api.github.com/users/timothyhinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/timothyhinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothyhinrichs/subscriptions","organizations_url":"https://api.github.com/users/timothyhinrichs/orgs","repos_url":"https://api.github.com/users/timothyhinrichs/repos","events_url":"https://api.github.com/users/timothyhinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/timothyhinrichs/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/open-policy-agent/opa/pulls/33/commits","review_comments_url":"https://api.github.com/repos/open-policy-agent/opa/pulls/33/comments","review_comment_url":"https://api.github.com/repos/open-policy-agent/opa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/open-policy-agent/opa/issues/33/comments","statuses_url":"https://api.github.com/repos/open-policy-agent/opa/statuses/12e299fdf241ba3d365f59d98aa448c1e26d9bd7","head":{"label":"tsandall:rest-api","ref":"rest-api","sha":"12e299fdf241ba3d365f59d98aa448c1e26d9bd7","user":{"login":"tsandall","id":238885,"avatar_url":"https://avatars.githubusercontent.com/u/238885?v=3","gravatar_id":"","url":"https://api.github.com/users/tsandall","html_url":"https://github.com/tsandall","followers_url":"https://api.github.com/users/tsandall/followers","following_url":"https://api.github.com/users/tsandall/following{/other_user}","gists_url":"https://api.github.com/users/tsandall/gists{/gist_id}","starred_url":"https://api.github.com/users/tsandall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsandall/subscriptions","organizations_url":"https://api.github.com/users/tsandall/orgs","repos_url":"https://api.github.com/users/tsandall/repos","events_url":"https://api.github.com/users/tsandall/events{/privacy}","received_events_url":"https://api.github.com/users/tsandall/received_events","type":"User","site_admin":false},"repo":{"id":51776679,"name":"opa","full_name":"tsandall/opa","owner":{"login":"tsandall","id":238885,"avatar_url":"https://avatars.githubusercontent.com/u/238885?v=3","gravatar_id":"","url":"https://api.github.com/users/tsandall","html_url":"https://github.com/tsandall","followers_url":"https://api.github.com/users/tsandall/followers","following_url":"https://api.github.com/users/tsandall/following{/other_user}","gists_url":"https://api.github.com/users/tsandall/gists{/gist_id}","starred_url":"https://api.github.com/users/tsandall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsandall/subscriptions","organizations_url":"https://api.github.com/users/tsandall/orgs","repos_url":"https://api.github.com/users/tsandall/repos","events_url":"https://api.github.com/users/tsandall/events{/privacy}","received_events_url":"https://api.github.com/users/tsandall/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsandall/opa","description":"An open source project to policy enable any application.","fork":true,"url":"https://api.github.com/repos/tsandall/opa","forks_url":"https://api.github.com/repos/tsandall/opa/forks","keys_url":"https://api.github.com/repos/tsandall/opa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsandall/opa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsandall/opa/teams","hooks_url":"https://api.github.com/repos/tsandall/opa/hooks","issue_events_url":"https://api.github.com/repos/tsandall/opa/issues/events{/number}","events_url":"https://api.github.com/repos/tsandall/opa/events","assignees_url":"https://api.github.com/repos/tsandall/opa/assignees{/user}","branches_url":"https://api.github.com/repos/tsandall/opa/branches{/branch}","tags_url":"https://api.github.com/repos/tsandall/opa/tags","blobs_url":"https://api.github.com/repos/tsandall/opa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsandall/opa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsandall/opa/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsandall/opa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsandall/opa/statuses/{sha}","languages_url":"https://api.github.com/repos/tsandall/opa/languages","stargazers_url":"https://api.github.com/repos/tsandall/opa/stargazers","contributors_url":"https://api.github.com/repos/tsandall/opa/contributors","subscribers_url":"https://api.github.com/repos/tsandall/opa/subscribers","subscription_url":"https://api.github.com/repos/tsandall/opa/subscription","commits_url":"https://api.github.com/repos/tsandall/opa/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsandall/opa/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsandall/opa/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsandall/opa/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsandall/opa/contents/{+path}","compare_url":"https://api.github.com/repos/tsandall/opa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsandall/opa/merges","archive_url":"https://api.github.com/repos/tsandall/opa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsandall/opa/downloads","issues_url":"https://api.github.com/repos/tsandall/opa/issues{/number}","pulls_url":"https://api.github.com/repos/tsandall/opa/pulls{/number}","milestones_url":"https://api.github.com/repos/tsandall/opa/milestones{/number}","notifications_url":"https://api.github.com/repos/tsandall/opa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsandall/opa/labels{/name}","releases_url":"https://api.github.com/repos/tsandall/opa/releases{/id}","deployments_url":"https://api.github.com/repos/tsandall/opa/deployments","created_at":"2016-02-15T18:37:20Z","updated_at":"2016-03-17T18:52:09Z","pushed_at":"2016-05-14T17:47:58Z","git_url":"git://github.com/tsandall/opa.git","ssh_url":"git@github.com:tsandall/opa.git","clone_url":"https://github.com/tsandall/opa.git","svn_url":"https://github.com/tsandall/opa","homepage":"","size":10606,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"open-policy-agent:master","ref":"master","sha":"f6c0e82b08910d2c62fe2282841d957f69e81213","user":{"login":"open-policy-agent","id":16468693,"avatar_url":"https://avatars.githubusercontent.com/u/16468693?v=3","gravatar_id":"","url":"https://api.github.com/users/open-policy-agent","html_url":"https://github.com/open-policy-agent","followers_url":"https://api.github.com/users/open-policy-agent/followers","following_url":"https://api.github.com/users/open-policy-agent/following{/other_user}","gists_url":"https://api.github.com/users/open-policy-agent/gists{/gist_id}","starred_url":"https://api.github.com/users/open-policy-agent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-policy-agent/subscriptions","organizations_url":"https://api.github.com/users/open-policy-agent/orgs","repos_url":"https://api.github.com/users/open-policy-agent/repos","events_url":"https://api.github.com/users/open-policy-agent/events{/privacy}","received_events_url":"https://api.github.com/users/open-policy-agent/received_events","type":"Organization","site_admin":false},"repo":{"id":48714685,"name":"opa","full_name":"open-policy-agent/opa","owner":{"login":"open-policy-agent","id":16468693,"avatar_url":"https://avatars.githubusercontent.com/u/16468693?v=3","gravatar_id":"","url":"https://api.github.com/users/open-policy-agent","html_url":"https://github.com/open-policy-agent","followers_url":"https://api.github.com/users/open-policy-agent/followers","following_url":"https://api.github.com/users/open-policy-agent/following{/other_user}","gists_url":"https://api.github.com/users/open-policy-agent/gists{/gist_id}","starred_url":"https://api.github.com/users/open-policy-agent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-policy-agent/subscriptions","organizations_url":"https://api.github.com/users/open-policy-agent/orgs","repos_url":"https://api.github.com/users/open-policy-agent/repos","events_url":"https://api.github.com/users/open-policy-agent/events{/privacy}","received_events_url":"https://api.github.com/users/open-policy-agent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-policy-agent/opa","description":"An open source project to policy enable any application.","fork":false,"url":"https://api.github.com/repos/open-policy-agent/opa","forks_url":"https://api.github.com/repos/open-policy-agent/opa/forks","keys_url":"https://api.github.com/repos/open-policy-agent/opa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-policy-agent/opa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-policy-agent/opa/teams","hooks_url":"https://api.github.com/repos/open-policy-agent/opa/hooks","issue_events_url":"https://api.github.com/repos/open-policy-agent/opa/issues/events{/number}","events_url":"https://api.github.com/repos/open-policy-agent/opa/events","assignees_url":"https://api.github.com/repos/open-policy-agent/opa/assignees{/user}","branches_url":"https://api.github.com/repos/open-policy-agent/opa/branches{/branch}","tags_url":"https://api.github.com/repos/open-policy-agent/opa/tags","blobs_url":"https://api.github.com/repos/open-policy-agent/opa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-policy-agent/opa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-policy-agent/opa/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-policy-agent/opa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-policy-agent/opa/statuses/{sha}","languages_url":"https://api.github.com/repos/open-policy-agent/opa/languages","stargazers_url":"https://api.github.com/repos/open-policy-agent/opa/stargazers","contributors_url":"https://api.github.com/repos/open-policy-agent/opa/contributors","subscribers_url":"https://api.github.com/repos/open-policy-agent/opa/subscribers","subscription_url":"https://api.github.com/repos/open-policy-agent/opa/subscription","commits_url":"https://api.github.com/repos/open-policy-agent/opa/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-policy-agent/opa/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-policy-agent/opa/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-policy-agent/opa/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-policy-agent/opa/contents/{+path}","compare_url":"https://api.github.com/repos/open-policy-agent/opa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-policy-agent/opa/merges","archive_url":"https://api.github.com/repos/open-policy-agent/opa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-policy-agent/opa/downloads","issues_url":"https://api.github.com/repos/open-policy-agent/opa/issues{/number}","pulls_url":"https://api.github.com/repos/open-policy-agent/opa/pulls{/number}","milestones_url":"https://api.github.com/repos/open-policy-agent/opa/milestones{/number}","notifications_url":"https://api.github.com/repos/open-policy-agent/opa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-policy-agent/opa/labels{/name}","releases_url":"https://api.github.com/repos/open-policy-agent/opa/releases{/id}","deployments_url":"https://api.github.com/repos/open-policy-agent/opa/deployments","created_at":"2015-12-28T22:08:25Z","updated_at":"2016-05-03T22:13:06Z","pushed_at":"2016-05-17T17:02:48Z","git_url":"git://github.com/open-policy-agent/opa.git","ssh_url":"git@github.com:open-policy-agent/opa.git","clone_url":"https://github.com/open-policy-agent/opa.git","svn_url":"https://github.com/open-policy-agent/opa","homepage":"","size":10527,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/open-policy-agent/opa/pulls/33"},"html":{"href":"https://github.com/open-policy-agent/opa/pull/33"},"issue":{"href":"https://api.github.com/repos/open-policy-agent/opa/issues/33"},"comments":{"href":"https://api.github.com/repos/open-policy-agent/opa/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/open-policy-agent/opa/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/open-policy-agent/opa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/open-policy-agent/opa/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/open-policy-agent/opa/statuses/12e299fdf241ba3d365f59d98aa448c1e26d9bd7"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tsandall","id":238885,"avatar_url":"https://avatars.githubusercontent.com/u/238885?v=3","gravatar_id":"","url":"https://api.github.com/users/tsandall","html_url":"https://github.com/tsandall","followers_url":"https://api.github.com/users/tsandall/followers","following_url":"https://api.github.com/users/tsandall/following{/other_user}","gists_url":"https://api.github.com/users/tsandall/gists{/gist_id}","starred_url":"https://api.github.com/users/tsandall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsandall/subscriptions","organizations_url":"https://api.github.com/users/tsandall/orgs","repos_url":"https://api.github.com/users/tsandall/repos","events_url":"https://api.github.com/users/tsandall/events{/privacy}","received_events_url":"https://api.github.com/users/tsandall/received_events","type":"User","site_admin":false},"comments":1,"review_comments":2,"commits":9,"additions":7740,"deletions":510,"changed_files":66}}