REST API áttekintés

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évHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

statequeryopen | resolved | all
cursorquerystring

Opaque cursor taken from meta.next_cursor of the previous page; omit it for the first page.

limitqueryinteger

Page size.

Válaszok

  • 200
  • 422 Validation error
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

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évHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

Kéréstörzs

NévTípus
titlekötelezőstring
impactkötelezőIncidentImpact (none, minor, major, critical)
internalboolean
started_atstring | null
monitor_idslist<integer>
status_page_idslist<integer>
statuskötelezőIncidentStatus (investigating, identified, monitoring, resolved)
messagekötelezőstring

Válaszok

  • 201
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation error

GET /workspaces/{workspace}/incidents/{incident}

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

incidentkötelezőpathinteger

The incident ID

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

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évHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

incidentkötelezőpathinteger

The incident ID

Kéréstörzs

NévTípus
titlestring
impactIncidentImpact (none, minor, major, critical)
internalboolean
started_atstring | null
monitor_idslist<integer>
status_page_idslist<integer>

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation error

DELETE /workspaces/{workspace}/incidents/{incident}

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

incidentkötelezőpathinteger

The incident ID

Válaszok

  • 204 No content
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

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évHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

incidentkötelezőpathinteger

The incident ID

Kéréstörzs

NévTípus
messagekötelezőstring
statuskötelezőIncidentStatus (investigating, identified, monitoring, resolved)

Válaszok

  • 201
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation 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évHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

incidentkötelezőpathinteger

The incident ID

updatekötelezőpathinteger

The update ID

Kéréstörzs

NévTípus
messagekötelezőstring

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation 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évHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

incidentkötelezőpathinteger

The incident ID

updatekötelezőpathinteger

The update ID

Válaszok

  • 204 No content
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated