{"action":"created","issue":{"url":"https://api.github.com/repos/chef/oc-id/issues/52","labels_url":"https://api.github.com/repos/chef/oc-id/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/chef/oc-id/issues/52/comments","events_url":"https://api.github.com/repos/chef/oc-id/issues/52/events","html_url":"https://github.com/chef/oc-id/pull/52","id":67473597,"number":52,"title":"Add a status endpoint","user":{"login":"raskchanky","id":947,"avatar_url":"https://avatars.githubusercontent.com/u/947?v=3","gravatar_id":"","url":"https://api.github.com/users/raskchanky","html_url":"https://github.com/raskchanky","followers_url":"https://api.github.com/users/raskchanky/followers","following_url":"https://api.github.com/users/raskchanky/following{/other_user}","gists_url":"https://api.github.com/users/raskchanky/gists{/gist_id}","starred_url":"https://api.github.com/users/raskchanky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raskchanky/subscriptions","organizations_url":"https://api.github.com/users/raskchanky/orgs","repos_url":"https://api.github.com/users/raskchanky/repos","events_url":"https://api.github.com/users/raskchanky/events{/privacy}","received_events_url":"https://api.github.com/users/raskchanky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/oc-id/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/chef/oc-id/labels/Signed%20CLA","name":"Signed CLA","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-09T23:40:12Z","updated_at":"2015-04-13T18:44:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef/oc-id/pulls/52","html_url":"https://github.com/chef/oc-id/pull/52","diff_url":"https://github.com/chef/oc-id/pull/52.diff","patch_url":"https://github.com/chef/oc-id/pull/52.patch"},"body":"This introduces a new endpoint, `/id/v1/status` that can be hit to check on the status of oc-id, similar to the one that Supermarket has.\r\n\r\nTwo things to note:\r\n* I removed the `api` subdirectory from `app/controllers` because with it in there, any request I made to any API endpoint resulted in an error that looks like this:\r\n![](https://dl.dropboxusercontent.com/s/5415cf0ppc5vb8c/2015-04-09%20at%2010.08%20AM.png?dl=0)\r\nI think this is due to the path on disk not matching the class name.  I'm not sure how this is working in production, but it wouldn't work for me at all without that change.\r\n\r\n* There is currently an empty method in `lib/health_check.rb` called `erchef_authentication`.  My thought was to use that to check that oc-id can actually authenticate successfully as _someone_ to erchef, since without that, oc-id is dead in the water.  The major obstacle there is who to authenticate as.  Maybe we can create a special user whose only purpose is to be an authentication test?  Put the username/password in the vault, and have them accessible in `Settings`?  I'm open to thoughts here."},"comment":{"url":"https://api.github.com/repos/chef/oc-id/issues/comments/92457084","html_url":"https://github.com/chef/oc-id/pull/52#issuecomment-92457084","issue_url":"https://api.github.com/repos/chef/oc-id/issues/52","id":92457084,"user":{"login":"smith","id":9912,"avatar_url":"https://avatars.githubusercontent.com/u/9912?v=3","gravatar_id":"","url":"https://api.github.com/users/smith","html_url":"https://github.com/smith","followers_url":"https://api.github.com/users/smith/followers","following_url":"https://api.github.com/users/smith/following{/other_user}","gists_url":"https://api.github.com/users/smith/gists{/gist_id}","starred_url":"https://api.github.com/users/smith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smith/subscriptions","organizations_url":"https://api.github.com/users/smith/orgs","repos_url":"https://api.github.com/users/smith/repos","events_url":"https://api.github.com/users/smith/events{/privacy}","received_events_url":"https://api.github.com/users/smith/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T18:44:48Z","updated_at":"2015-04-13T18:44:48Z","body":"This looks good overall. I had some comments above.\r\n\r\nDo we want to always send a 200 response for this or does it make sense to send a 503 as the status when something's wrong?"}}