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[]=45337' \
-d 'component_ids[]=45338' \
-d 'component_ids[]=45339' \
-H "Authorization: Bearer 129spul0wcxabrfsnscn6lwrledmp2afbuaxgt1w42s74xds70fgln85e4s3"
Special Request Parameters
These attributes are not part of the standard resource and only apply on this specific action.
Attribute Name | Description |
---|---|
type | Either “planned” or “unplanned” |
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 | An array of numeric IDs for the components which are affected by this incident. The component will then be ‘degraded’ the whole time the notice is ongoing. i.e. [‘1’, ‘2’, ‘3’] |
begins_at_date (‘planned’ only) | The date that the planned notice should start. In the format ‘YYYY-MM-DD’. i.e. ‘2019-01-29’ |
begins_at_time (‘planned’ only) | The time that the planned notice should start in UTC (regardless of your page timezone, must be passed as UTC). In the 24 hour format ‘HH:MM:SS’. i.e. ‘16:30:00’ |
duration_in_minutes (‘planned’ only) | The number of minutes that the maintenance is expected to last. |
Example Response
{
"response": {
"id": 204499,
"type": "unplanned",
"state": "investigating",
"timeline_state": "present",
"subject": "API Performance Issues",
"synopsis": "This is an example notice.",
"link": "https://status.example-inc.com/notices/m3y9rng9tlzuzahz-api-performance-issues",
"began_at": "2022-12-05T12:49:31.039Z",
"ended_at": null,
"created_at": "2022-12-05T12:49:31.181Z",
"updated_at": "2022-12-05T12:49:31.181Z"
}
}