API · v1.4.0
Incidents
8 végpont. Az útvonalak a saját példánya /api/v1 címéhez képest értendők; a hitelesítést az áttekintő oldal írja le.
GET /workspaces/{workspace}/incidents
Lists the incidents of the workspace, newest start first
state narrows the list to open (not yet resolved), resolved, or all (default). The timeline of each incident is only included when a single incident is fetched.
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
state | query | open | resolved | all | |
cursor | query | string | Opaque cursor taken from |
limit | query | integer | Page size. |
Válaszok
200422Validation error404Not found403Authorization error401Unauthenticated
POST /workspaces/{workspace}/incidents
Creates an incident with its first timeline update
An internal incident appears on no status page, not even through a monitor shown on a page, so status_page_ids must be empty or omitted when internal is true.
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
Kéréstörzs
| Név | Típus |
|---|---|
titlekötelező | string |
impactkötelező | IncidentImpact (none, minor, major, critical) |
internal | boolean |
started_at | string | null |
monitor_ids | list<integer> |
status_page_ids | list<integer> |
statuskötelező | IncidentStatus (investigating, identified, monitoring, resolved) |
messagekötelező | string |
Válaszok
201404Not found403Authorization error401Unauthenticated422Validation error
GET /workspaces/{workspace}/incidents/{incident}
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
incidentkötelező | path | integer | The incident ID |
Válaszok
200404Not found403Authorization error401Unauthenticated
PATCH /workspaces/{workspace}/incidents/{incident}
Updates the incident's own fields and targets; omitted fields keep their stored value
An internal incident appears on no status page, not even through a monitor shown on a page, so it cannot be linked to status pages: status_page_ids must be empty or omitted while it is internal. To switch an incident with linked pages to internal, send "status_page_ids": [] in the same request; otherwise the request is refused with a 422 on status_page_ids and nothing changes.
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
incidentkötelező | path | integer | The incident ID |
Kéréstörzs
| Név | Típus |
|---|---|
title | string |
impact | IncidentImpact (none, minor, major, critical) |
internal | boolean |
started_at | string | null |
monitor_ids | list<integer> |
status_page_ids | list<integer> |
Válaszok
200404Not found403Authorization error401Unauthenticated422Validation error
DELETE /workspaces/{workspace}/incidents/{incident}
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
incidentkötelező | path | integer | The incident ID |
Válaszok
204No content404Not found403Authorization error401Unauthenticated
POST /workspaces/{workspace}/incidents/{incident}/updates
Adds a timeline entry. The incident takes the entry's status; resolved stamps the resolution time and
any open status after a resolution reopens the incident
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
incidentkötelező | path | integer | The incident ID |
Kéréstörzs
| Név | Típus |
|---|---|
messagekötelező | string |
statuskötelező | IncidentStatus (investigating, identified, monitoring, resolved) |
Válaszok
201404Not found403Authorization error401Unauthenticated422Validation error
PATCH /workspaces/{workspace}/incidents/{incident}/updates/{update}
Edits the message of a timeline entry; its status and time stay as recorded
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
incidentkötelező | path | integer | The incident ID |
updatekötelező | path | integer | The update ID |
Kéréstörzs
| Név | Típus |
|---|---|
messagekötelező | string |
Válaszok
200404Not found403Authorization error401Unauthenticated422Validation error
DELETE /workspaces/{workspace}/incidents/{incident}/updates/{update}
Removes a timeline entry and recomputes the incident's status from the latest remaining one. The only entry cannot be removed; delete the incident instead
Paraméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workspacekötelező | path | string | The workspace slug |
incidentkötelező | path | integer | The incident ID |
updatekötelező | path | integer | The update ID |
Válaszok
204No content404Not found403Authorization error401Unauthenticated