The status pages API is for public and customer status pages only.
Prerequisites
This article assumes you already have a status page up and running. To use the API, you will need have created an API key with the required scopes. For read-only access (listing status pages, viewing structure, incidents, and maintenance windows), any valid API key will work. For write requests (creating incidents, maintenance windows, and publishing updates), you will need an API key with the “Create status page incidents, maintenance windows and publish updates” scope. You can create an API key in the incident.io dashboard.API docsYou can find details of all endpoints in the Status Page V2 API docs.
Status page incidents
- Creating a status page incident
CreateStatusPageIncident endpoint.
- You will need the ID of your status page. This can be found using the
ListStatusPagesendpoint, which lists your status pages by name and ID. - You will need to set an initial
incident_statusfor the incident, give it anameand provide amessagewhich will be used for publishing that initial update. - Optionally, you can specify which components the incident has affected by providing their
component_statuses. You will need the IDs of the components, which you can find using theShowStatusPageStructureendpoint once you’ve already found out your page’s ID. - You’re also required to provide a unique
idempotency_keyfor the incident and whether tonotify_subscribersto your status page.
- Publishing an update on a status page incident
UpdateStatusPageIncident endpoint.
- You can update the
incident_statusand/orcomponent_statuses, and provide a newmessageto your viewers and subscribers.
- Resolving a status page incident
UpdateStatusPageIncident endpoint, setting the incident_status to "resolved".
Any components affected by the incident will be reset to "operational" (within that incident).
- Updating the status page incident’s name (optional)
UpdateStatusPageIncident endpoint described in the API docs.
Status page maintenance windows
Status page maintenance windows are similar to status page incidents, so this focuses on the important differences and features.- Scheduling a status page maintenance window
CreateStatusPageMaintenance endpoint.
- Unlike with status page incidents, you will need to provide a
start_atandend_atwhen scheduling maintenance. - You supply a
maintenance_statusrather than anincident_status. - Optionally, you provide a list of the IDs of components affected by the maintenance.
- Publishing an update on a status page maintenance window
CreateStatusPageMaintenanceUpdate endpoint.
In the incident.io dashboard, you can choose to manually or automatically update the status of a maintenance window. The API uses the manual status updates approach: you must publish updates in order to update the maintenance window’s status, and move it from e.g. "maintenance_scheduled" to "maintenance_in_progress".
- Completing a status page maintenance window
CreateStatusPageMaintenanceUpdate endpoint to publish a final update, this time setting the maintenance_status to "maintenance_complete".