NOTE

Creating new notices, and updating existing notices will trigger their publication not only to the Status Page but also to any configured integrations such as Twitter, Facebook or Mailchimp.

Endpoint & Available Methods

https://api.sorryapp.com/v1/pages/:page_id/notices/(:notice_id)

The Notice Object

These are the attributes which represent the object, most of which can be posted too and received in response to the actions.

Attribute Name Description
id The unique identifier for the notices.
type Either 'planned' or 'unplanned', planned notices include expected start times and durations, often used for maintenance.
subject The subject for a notice i.e. API Performance Issues
synopsis A short description of the notice, taken from the first comment/update.
state The current state of the notice. Available states depend on the notice type. For planned: 'scheduled', 'underway', 'complete' and for unplanned: 'investigating', 'identified', 'recovering', 'resolved' and 'false_alarm'
timeline_state This gives you an idea of whether a notice is 'future', 'present', 'past_recent' or 'past_distant'. Past notices are those which are closed or resolved, _recent and _distant depend on whether it was closed in the past 7 days, or previously. (Read-only)
begins_at 'planned' only The date/time a planned notice is expected to go underway.
ends_at 'planned' only The date/time a planned notice is expected to be complete.
began_at The date/time the notice was opened (if unplanned), or went underway (if planned).
ended_at The date/time the notice was closed (if unplanned), or was complete (if planned).
should_automate_schedule 'planned' only A boolean to determine if planned notices should automatically switch to 'underway' and 'complete' at the scheduled times.
created_at The date/time the record was created.
updated_at The date/time the record was last updated.
link A permanent link to the notice on the public status page.
include updates, components

List Notice

GET https://api.sorryapp.com/v1/pages/:page_id/notices

Example Request

curl -X GET https://api.sorryapp.com/v1/pages/:page_id/notices \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":[{"id":1,"type":"unplanned","state":"investigating","timeline_state":"present","subject":"API Performance Issues","synopsis":"We're currently seeing slow response times on our API, we're looking into the issue now.","link":"https://status.sorryapp.com/#notice-1","began_at":"2016-02-09 14:39:21 +0000","ended_at":"nil","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}],"count":1}

Create Notice

POST https://api.sorryapp.com/v1/pages/:page_id/notices

Example Request

curl -X POST https://api.sorryapp.com/v1/pages/:page_id/notices \
  -d type="unplanned" \
  -d subject="API Performance Issues" \
  -d initial_comment="This is an example notice." \
  -d should_publish="1" \
  -d component_ids[]="1" \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Special Request Parameters

These attributes are not part of the standard resource and only apply on this specific action.

Attribute Name Description
initial_comment Pass this to create a single update to introduce the notice.
should_publish Boolean, Send these changes out through Email, Slack Twitter etc.
component_ids[] Pass multiple component_ids[] in the request, each with a numeric ID for the component which is affected by this incident. The component will then be 'degraded' the whole time the notice is ongoing.
begins_at_date 'planned' only The date that the planned notice should start.
begins_at_time 'planned' only The time that the planned notice should start.
duration_in_minutes 'planned' only The number of minutes that the maintenance is expected to last.

Example Response

{"response":{"id":1,"type":"unplanned","state":"investigating","timeline_state":"present","subject":"API Performance Issues","synopsis":"We're currently seeing slow response times on our API, we're looking into the issue now.","link":"https://status.sorryapp.com/#notice-1","began_at":"2016-02-09 14:39:21 +0000","ended_at":"nil","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Retrieve Notice

GET https://api.sorryapp.com/v1/pages/:page_id/notices/:notice_id

Example Request

curl -X GET https://api.sorryapp.com/v1/pages/:page_id/notices/:notice_id \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":{"id":1,"type":"unplanned","state":"investigating","timeline_state":"present","subject":"API Performance Issues","synopsis":"We're currently seeing slow response times on our API, we're looking into the issue now.","link":"https://status.sorryapp.com/#notice-1","began_at":"2016-02-09 14:39:21 +0000","ended_at":"nil","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Update Notice

PATCH https://api.sorryapp.com/v1/pages/:page_id/notices/:notice_id

Example Request

curl -X PATCH https://api.sorryapp.com/v1/pages/:page_id/notices/:notice_id \
  -d additional_comment="This is an example notice." \
  -d state="resolved" \
  -d should_publish="1" \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Special Request Parameters

These attributes are not part of the standard resource and only apply on this specific action.

Attribute Name Description
additional_comment Pass this to create a single update to introduce the notice.
state Allows you to change the state of the notice.
should_publish Boolean, send these changes out through Email, Slack Twitter etc.
component_ids[] Pass multiple component_ids[] in the request, each with a numeric ID for the component which is affected by this incident. The component will then be 'degraded' the whole time the notice is ongoing.
begins_at_date 'planned' only The date that the planned notice should start.
begins_at_time 'planned' only The time that the planned notice should start.
duration_in_minutes 'planned' only The number of minutes that the maintenance is expected to last.

Example Response

{"response":{"id":1,"type":"unplanned","state":"investigating","timeline_state":"present","subject":"API Performance Issues","synopsis":"We're currently seeing slow response times on our API, we're looking into the issue now.","link":"https://status.sorryapp.com/#notice-1","began_at":"2016-02-09 14:39:21 +0000","ended_at":"nil","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Delete Notice

DELETE https://api.sorryapp.com/v1/pages/:page_id/notices/:notice_id

Example Request

curl -X DELETE https://api.sorryapp.com/v1/pages/:page_id/notices/:notice_id \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"