Components
Components allow you to detail the various elements of your service or infrastructure, making it easier for your audience to understand how the service is effected.
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’.
Endpoints
https://api.sorryapp.com/v1/pages/:page_id/components/
https://api.sorryapp.com/v1/pages/:page_id/components/:component_id
Objects
These are the attributes which represent the object, most of which can be posted too and received in response to the available methods.
Properties
- Name
id
- Description
The unique identifier for the component
- Name
state
- Description
Determined by any associated open notices, or the state of it's ancestors and descendants. One of 'operational', 'degraded', 'partially-degraded'.
- Name
name
- Description
The name of the component i.e. Database Server.
- Name
description
- Description
An optional description of what the component is, displayed next to the name.
- Name
position
- Description
Used to order components on the status page, lower numbers display higher than those with higher numbers.
- Name
parent_id
- Description
Optional ID of the components parent, allowing you to recursively nest/group components.
- Name
created_at
- Description
The date/time the record was created.
- Name
updated_at
- Description
The date/time the record was last updated.
List components
This endpoint displays a list of all components for a single status page.
Request
curl -X GET https://api.sorryapp.com/v1/pages/12ab34cd/components \
-H "Authorization: Bearer {token}"
Response
{
"response": [
{
"id": 1,
"state": "operational",
"name": "Website",
"description": "www.acme.com",
"position": 1,
"parent_id": null,
"created_at": "2025-01-21T14:27:29.367Z",
"updated_at": "2025-01-21T14:27:29.367Z"
},
{
"id": 2,
"state": "operational",
"name": "Help Center",
"description": null,
"position": 2,
"parent_id": null,
"created_at": "2025-01-21T14:27:29.475Z",
"updated_at": "2025-01-21T14:36:41.165Z"
}
],
"count": 2
}
Create a component
This endpoint allows you to create a new component in a single status page.
Required attributes
- Name
name
- Type
- string
- Description
The name of the component
Request
curl -X POST https://api.sorryapp.com/v1/pages/12ab34cd/components \
-d name="API" \
-d description="api.acme.com/v1" \
-H "Authorization: Bearer {token}"
Response
{
"response": {
"id": 3,
"state": "operational",
"name": "API",
"description": "api.acme.com/v1",
"position": 3,
"parent_id": null,
"created_at": "2025-01-22T13:55:26.390Z",
"updated_at": "2025-01-22T13:55:26.390Z"
}
}
Retrieve a component
This endpoint allows you to retrieve the details of a single component, including its state.
Request
curl -X GET https://api.sorryapp.com/v1/pages/12ab34cd/components/3 \
-H "Authorization: Bearer {token}"
Response
{
"response": {
"id": 3,
"state": "operational",
"name": "API",
"description": "api.acme.com/v1",
"position": 5,
"parent_id": null,
"created_at": "2025-01-22T13:55:26.390Z",
"updated_at": "2025-01-22T13:55:26.390Z"
}
}
Update a component
This endpoint allows you to update the status page, such as name, timezone, support email etc.
Request
curl -X PATCH https://api.sorryapp.com/v1/pages/12ab34cd/components/3 \
-d description="Acme RESTful API version 1." \
-H "Authorization: Bearer {token}"
Response
{
"response": {
"id": 87611,
"state": "operational",
"name": "API",
"description": "Acme RESTful API version 1",
"position": 5,
"parent_id": null,
"created_at": "2025-01-22T13:55:26.390Z",
"updated_at": "2025-01-22T14:02:57.093Z"
}
}
Delete a component
This endpoint allows you to delete the a component. Note that this does not delete associated notices.
Request
curl -X DELETE https://api.sorryapp.com/v1/pages/12ab34cd/components/3 \
-H "Authorization: Bearer {token}"