Skip to content

Instantly share code, notes, and snippets.

@markpundsack
Created April 25, 2012 19:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save markpundsack/2492606 to your computer and use it in GitHub Desktop.
Save markpundsack/2492606 to your computer and use it in GitHub Desktop.
Heroku Status API v3

Heroku Status API v3 (second draft)

Get current status

$ curl "https://status-beta.heroku.com/api/v3/current-status"
{"status":{"Production":"green","Development":"green"},"issues":[]}

Get list of issues (optionally limited by date or count)

$ curl "https://status-beta.heroku.com/api/v3/issues?since=2012-04-24&limit=1"
[{"created_at":"2012-04-24T14:02:39Z","id":336,"resolved":true,"title":"Custom Domains: Errors Adding / Updating","updated_at":"2012-04-24T15:24:58Z","updates":[{"contents":"The fix has been applied, and custom domains are functioning as expected.\r\n\r\nFurther investigation shows that custom domains created or updated after 4/23/2012 19:50 UTC were affected.","created_at":"2012-04-24T15:24:58Z","id":980,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"resolved","updated_at":"2012-04-24T15:24:58Z"},{"contents":"All previously malfunctioning custom domains are now online.  Engineers are continuing to roll out the fix.","created_at":"2012-04-24T15:06:53Z","id":979,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"update","updated_at":"2012-04-24T15:06:53Z"},{"contents":"The issue has been identified and engineers are working to fix.","created_at":"2012-04-24T14:45:49Z","id":978,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"update","updated_at":"2012-04-24T14:45:49Z"},{"contents":"Engineers are still investigating the source of issues regarding custom domains. We have determined that only domains added or updated in the past 24 hours should be affected.\r\n\r\nWe'll continue to provide more information as it becomes available.","created_at":"2012-04-24T14:23:58Z","id":977,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"update","updated_at":"2012-04-24T15:08:53Z"},{"contents":"Engineers are investigating issues with custom domains around applications. We will provide more information as it becomes available.","created_at":"2012-04-24T14:02:39Z","id":976,"incident_id":336,"status_dev":"yellow","status_prod":"yellow","update_type":"issue","updated_at":"2012-04-24T14:02:50Z"}]}]

Get a single issue by ID number

$ curl "https://status-beta.heroku.com/api/v3/issues/336"
{"created_at":"2012-04-24T14:02:39Z","id":336,"resolved":true,"title":"Custom Domains: Errors Adding / Updating","updated_at":"2012-04-24T15:24:58Z","updates":[{"contents":"The fix has been applied, and custom domains are functioning as expected.\r\n\r\nFurther investigation shows that custom domains created or updated after 4/23/2012 19:50 UTC were affected.","created_at":"2012-04-24T15:24:58Z","id":980,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"resolved","updated_at":"2012-04-24T15:24:58Z"},{"contents":"All previously malfunctioning custom domains are now online.  Engineers are continuing to roll out the fix.","created_at":"2012-04-24T15:06:53Z","id":979,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"update","updated_at":"2012-04-24T15:06:53Z"},{"contents":"The issue has been identified and engineers are working to fix.","created_at":"2012-04-24T14:45:49Z","id":978,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"update","updated_at":"2012-04-24T14:45:49Z"},{"contents":"Engineers are still investigating the source of issues regarding custom domains. We have determined that only domains added or updated in the past 24 hours should be affected.\r\n\r\nWe'll continue to provide more information as it becomes available.","created_at":"2012-04-24T14:23:58Z","id":977,"incident_id":336,"status_dev":"green","status_prod":"green","update_type":"update","updated_at":"2012-04-24T15:08:53Z"},{"contents":"Engineers are investigating issues with custom domains around applications. We will provide more information as it becomes available.","created_at":"2012-04-24T14:02:39Z","id":976,"incident_id":336,"status_dev":"yellow","status_prod":"yellow","update_type":"issue","updated_at":"2012-04-24T14:02:50Z"}]}
@markpundsack
Copy link
Author

Heads-up to any API consumers, I'm updating current-status to return the current issues if there are any. Will look something like this:

{"status":{"Production":"yellow","Development":"yellow"},"issues":[{"created_at":"2012-05-09T23:12:43Z","id":353,"resolved":false,"title":"Potential Platform Issue","updated_at":"2012-05-09T23:12:43Z","href":"https://status-beta.heroku.com/api/v3/issues/353","updates":[{"contents":"Investigating a potential issue with elevated error rates","created_at":"2012-05-09T23:12:43Z","id":1015,"incident_id":353,"status_dev":"yellow","status_prod":"yellow","update_type":"issue","updated_at":"2012-05-09T23:12:43Z"}]}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment