NOTE

To change the state of a component you must associate a notice with it. When an associated notice is ongoing the state of the associated components will show as ‘degraded’.

Endpoint & Available Methods

https://api.sorryapp.com/v1/pages/:page_id/components/(:component_id)

The Component 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 component
state Determined by any associated open notices, or the state of it's ancestors and descendants. One of 'operational', 'degraded', 'partially-degraded'.
name The name of the component i.e. Database Server.
description An optional description of what the component is, displayed next to the name.
position Used to order components on the status page, lower numbers display higher than those with higher numbers.
parent_id Optional ID of the components parent, allowing you to recursively nest/group components.
created_at The date/time the record was created.
updated_at The date/time the record was last updated.
include parent, ancestors, children, descendants and siblings

List Component

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

Example Request

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

Example Response

{"response":[{"id":1,"state":"operational","name":"Database Server","description":"The main data store for our application, if degraded the site will be unavailable.","position":1,"parent_id":null,"created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}],"count":1}

Create Component

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

Example Request

curl -X POST https://api.sorryapp.com/v1/pages/:page_id/components \
  -d name="Database Server" \
  -d description="The main data store for our application, if degraded the site will be unavailable." \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":{"id":1,"state":"operational","name":"Database Server","description":"The main data store for our application, if degraded the site will be unavailable.","position":1,"parent_id":null,"created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Retrieve Component

GET https://api.sorryapp.com/v1/pages/:page_id/components/:component_id

Example Request

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

Example Response

{"response":{"id":1,"state":"operational","name":"Database Server","description":"The main data store for our application, if degraded the site will be unavailable.","position":1,"parent_id":null,"created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Update Component

PATCH https://api.sorryapp.com/v1/pages/:page_id/components/:component_id

Example Request

curl -X PATCH https://api.sorryapp.com/v1/pages/:page_id/components/:component_id \
  -d description="Where we keep all your personal data safe and sound." \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":{"id":1,"state":"operational","name":"Database Server","description":"The main data store for our application, if degraded the site will be unavailable.","position":1,"parent_id":null,"created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Delete Component

DELETE https://api.sorryapp.com/v1/pages/:page_id/components/:component_id

Example Request

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