Skip to content
v1
Docs

API reference

Incidents

Incidents: what went wrong, its timeline and how to act on it.

Its operations need the scopes incidents.view or incidents.edit.

The Incident object

Attributes

  • uuidstring

    The incident’s uuid.

  • statusstring

    One of open, acknowledged, resolved.

  • severitystring

    One of warning, critical.

  • messagestring

    The incident’s message, as the alarm worded it when it fired.

  • rule_namestring

    The alarm’s own name, which tells apart two alarms on one metric.

  • rule_slugany

    The slug of the catalogue rule behind the alarm; null once the alarm is gone.

  • metric_nameany

    The catalogue rule’s name; null once the alarm is gone.

  • scan_typeany

    The kind of scan that raises the incident, for a rule that is raised by scans; null otherwise.

  • entityobject

    The resource the incident is about, of any type that has alarms.

  • parent_entityobject or null

    The server of a volume, port or unit; null for every other entity.

  • serverobject or null

    The server the incident is about: the entity itself for a server incident, its server for a volume, port or unit; null for every other type, which has no server.

  • triggered_atinteger or null

    Epoch milliseconds. When the incident was triggered.

    An instant: epoch milliseconds, UTC.
  • acknowledged_atinteger or null

    Epoch milliseconds. When the incident was acknowledged; null while it has not been.

    An instant: epoch milliseconds, UTC.
  • acknowledged_byobject or null

    Who acknowledged the incident; null while it has not been.

  • resolved_atinteger or null

    Epoch milliseconds. When the incident was resolved; null while it is open.

    An instant: epoch milliseconds, UTC.
  • resolved_byobject or null

    Who resolved the incident; null while it is open or when the system resolved it.

  • resolved_by_systemboolean

    Whether the system resolved it (the condition cleared), not a person.

  • console_urlstring

    The address of the incident’s page in the WatchTower15 console.

  • change_detailobject

    What changed when the incident fired, {<field>: {old, new}}, the stored normalised strings (an SSL instant as its text, the one exception to epoch milliseconds); {} with none. The WHOIS registrant fields are left out.

  • alarm_uuidstring or null

    The alarm the incident belongs to; null once it is gone.

  • trigger_scan_uuidstring or null

    The scan that raised the incident.

  • resolve_scan_uuidstring or null

    The scan that cleared it.

  • notification_sent_atinteger or null

    Epoch milliseconds: when notifications for the trigger were sent; null when none were.

    An instant: epoch milliseconds, UTC.
  • notification_held_atinteger or null

    Epoch milliseconds: when an alarm snooze on the incident’s resource (its server, that server’s profile or its service) held its triggered notification; null when none is held. Cleared when the snooze’s end releases it, or when it is acknowledged or resolved first.

    An instant: epoch milliseconds, UTC.
  • notificationsarray of objects

    The notifications sent for the incident, one for each channel.

  • unit_stateobject or null

    The state of the systemd unit when the incident opened, so what it was doing is known after it recovers; null for an incident on anything else and for one opened before this was recorded.

Get an incident

GET/v1/incidents/{incident_uuid}

Returns one incident with what changed when it fired, the alarm it belongs to, the scans that raised and cleared it, and the notifications sent for it.

Needs the scope incidents.view.

Path parameters

  • incident_uuidstring (uuid)Required

    The uuid of the incident.

Returns

200 OK:

The incident.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

List incidents

GET/v1/incidents

Lists the organisation’s incidents by when they were triggered, newest first unless direction is asc. Filter by status, by one resource with entity_type and entity_uuid, by metric source with metric_source_uuids (the incidents of those sources’ custom metrics), and by a time window; an incident is listed when it was open at any point inside the window. With no window, every incident is listed. Pages by page and per_page (limit is the same as per_page); every page carries current_page, per_page, last_page and total.

Needs the scope incidents.view.

Query parameters

  • statusarray of strings or nullOptional

    Only incidents in these statuses: any of open, acknowledged and resolved; with none, every status. A bare value is read as a one-item list. A list: repeat the parameter (status=open&status=acknowledged) or send one value (status=open); status[]=open is accepted too.

    Values:openacknowledgedresolved(an open set: new values may be added)
  • entity_typestring or nullOptional

    The type of resource to list incidents of; required with entity_uuid. Alone, the incidents of every resource of that type. server includes each server’s volumes, ports and systemd units, with or without entity_uuid (on GET /v1/organisation/alarms, entity_type=server is the servers’ own alarms only).

    Values:domainserviceserverlog_sourcecustom_metricdatabase_instanceserver_portserver_system_serviceserver_volume(an open set: new values may be added)
  • entity_uuidstring (uuid) or nullOptional

    The uuid of the resource to list incidents of; it needs its entity_type.

  • directionstring or nullOptional

    The order by trigger time: desc (the default) is the newest first, asc the oldest first.

    Values:ascdesc(an open set: new values may be added)
  • periodstring or nullOptional

    A relative window ending now: 1 to 9999 minutes, hours, days or weeks (3h, 2w). Not with from and to. The operation names its longest window and its default.

  • fromstring or nullOptional

    The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs to. A start before the oldest data kept is served from it.

  • tostring or nullOptional

    The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after from. A window that ends before the oldest data kept, or in the future, is refused.

  • limitinteger or nullOptional

    The same as per_page, kept for existing clients.

  • include_totalstring or nullOptional

    Ignored: total is always present.

    Values:truefalse10(an open set: new values may be added)
  • metric_source_uuidsarray of strings or nullOptional

    Only the incidents of these metric sources’ custom metrics, by source uuid, at most 100; a single uuid may be sent bare. A list: repeat the parameter (metric_source_uuids=<uuid>&metric_source_uuids=<uuid>) or send one value (metric_source_uuids=<uuid>); metric_source_uuids[]=<uuid> is accepted too.

  • rule_slugarray of strings or nullOptional

    Only incidents of alarms on these catalogue rules, by rule_slug; every rule when omitted. A bare value is read as a one-item list. An incident of an alarm that was since deleted is still listed. A list: repeat the parameter (rule_slug=<value>&rule_slug=<value>) or send one value (rule_slug=<value>); rule_slug[]=<value> is accepted too.

  • severityarray of strings or nullOptional

    Only incidents of these severities: warning or critical; every severity when omitted. A bare value is read as a one-item list. A list: repeat the parameter (severity=warning&severity=critical) or send one value (severity=warning); severity[]=warning is accepted too.

    Values:warningcritical(an open set: new values may be added)
  • per_pageinteger or nullOptional

    How many incidents to return in one page, from 1 to 100.

  • pageinteger or nullOptional

    The page to read, from 1; 1 when omitted. A page past the last answers no rows.

Returns

200 OK:

One page of the organisation’s incidents.

Each item of the page:

  • uuidstring

    The incident’s uuid.

  • statusstring

    One of open, acknowledged, resolved.

  • severitystring

    One of warning, critical.

  • messagestring

    The incident’s message, as the alarm worded it when it fired.

  • rule_namestring

    The alarm’s own name, which tells apart two alarms on one metric.

  • rule_slugany

    The slug of the catalogue rule behind the alarm; null once the alarm is gone.

  • alarm_uuidstring or null

    The uuid of the alarm that raised the incident; null when the alarm no longer resolves. The alarm may since have been deleted: GET /v1/alarms/{alarm_uuid} then answers 404.

  • metric_nameany

    The catalogue rule’s name; null once the alarm is gone.

  • scan_typeany

    The kind of scan that raises the incident, for a rule that is raised by scans; null otherwise.

  • entityobject

    The resource the incident is about, of any type that has alarms.

  • parent_entityobject or null

    The server of a volume, port or unit; null for every other entity.

  • serverobject or null

    The server the incident is about: the entity itself for a server incident, its server for a volume, port or unit; null for every other type, which has no server.

  • triggered_atinteger or null

    Epoch milliseconds. When the incident was triggered.

    An instant: epoch milliseconds, UTC.
  • acknowledged_atinteger or null

    Epoch milliseconds. When the incident was acknowledged; null while it has not been.

    An instant: epoch milliseconds, UTC.
  • acknowledged_byobject or null

    Who acknowledged the incident; null while it has not been.

  • resolved_atinteger or null

    Epoch milliseconds. When the incident was resolved; null while it is open.

    An instant: epoch milliseconds, UTC.
  • resolved_byobject or null

    Who resolved the incident; null while it is open or when the system resolved it.

  • resolved_by_systemboolean

    Whether the system resolved it (the condition cleared), not a person.

  • console_urlstring

    The address of the incident’s page in the WatchTower15 console.

  • notificationsarray of objects

    The notifications sent for the incident, one for each channel.

  • unit_stateobject or null

    The state of the systemd unit when the incident opened, so what it was doing is known after it recovers; null for an incident on anything else and for one opened before this was recorded.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Acknowledge an incident

POST/v1/incidents/{incident_uuid}/acknowledge

Acknowledges an open incident, as the console’s Acknowledge does, and records the key’s user as who acknowledged it. The call is safe to repeat: changed says whether it changed anything, and is false for an incident that was no longer open.

Needs the scope incidents.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • incident_uuidstring (uuid)Required

    The uuid of the incident.

Returns

200 OK:

The incident after the call, with whether the call changed it.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.

Resolve an incident

POST/v1/incidents/{incident_uuid}/resolve

Resolves an incident by hand, as the console’s Resolve does, and records the key’s user as who resolved it. changed says whether the call changed anything, and resolution says how WatchTower15 will treat the condition afterwards. Repeating the call on a resolved incident changes nothing.

Needs the scope incidents.edit.

Headers

  • Idempotency-KeystringOptional

    Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries Idempotent-Replayed: true); the same key on a different request is refused 422 invalid_request.

Path parameters

  • incident_uuidstring (uuid)Required

    The uuid of the incident.

Returns

200 OK:

The incident after the call, with whether the call changed it and how the condition is treated.

Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.