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.
- typeany
The type of the resource, such as
server. - uuidany
The uuid of the resource.
- nameany
The name of the resource.
- parent_entityobject or null
The server of a volume, port or unit; null for every other entity.
- typestring
The type of the server, such as
server. - uuidstring
The uuid of the server.
- namestring or null
The name of the server.
- 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.
- uuidstring
The uuid of the server.
- namestring or null
The name of the 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.
- namestring or null
The person’s display name; null when it is not known.
- 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.
- namestring or null
The person’s display name; null when it is not known.
- 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.
- channelstring
The channel it went out on, such as
emailorslack: an open set. - statusstring
How it went:
sent,failed,skippedorqueued, as the notifier records it; an open set. - sent_atinteger or null
Epoch milliseconds. When the notification was sent; null when it was not sent.
An instant: epoch milliseconds, UTC.
- 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.
- active_statestring or null
systemd’s
ActiveStateof the unit when the incident opened. - sub_statestring or null
systemd’s
SubStateof the unit when the incident opened. - resultstring or null
systemd’s
Resultof the unit when the incident opened; null when it was not reported (the unit was active or had not run). - exit_codeinteger or null
The unit’s exit status when the incident opened (systemd’s
ExecMainStatus, or the signal number whenresultissignalorcore-dump); null when not reported. - state_changed_atinteger or null
Epoch milliseconds. When the unit’s state last changed, as it stood when the incident opened; null when not known.
An instant: epoch milliseconds, UTC. - active_entered_atinteger or null
Epoch milliseconds. When the unit last entered
active, as it stood when the incident opened; null when it has not since it was loaded.An instant: epoch milliseconds, UTC. - inventory_atinteger or null
Epoch milliseconds. When the agent reported the inventory this state was read from, at most one system-info interval before the incident opened.
An instant: epoch milliseconds, UTC.
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,acknowledgedandresolved; 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[]=openis 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.serverincludes each server’s volumes, ports and systemd units, with or withoutentity_uuid(onGET /v1/organisation/alarms,entity_type=serveris 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,ascthe 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 withfromandto. 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:
totalis 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:
warningorcritical; 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[]=warningis 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.
- typeany
The type of the resource, such as
server. - uuidany
The uuid of the resource.
- nameany
The name of the resource.
- parent_entityobject or null
The server of a volume, port or unit; null for every other entity.
- typestring
The type of the server, such as
server. - uuidstring
The uuid of the server.
- namestring or null
The name of the server.
- 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.
- uuidstring
The uuid of the server.
- namestring or null
The name of the 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.
- namestring or null
The person’s display name; null when it is not known.
- 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.
- namestring or null
The person’s display name; null when it is not known.
- 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.
- channelstring
The channel it went out on, such as
emailorslack: an open set. - statusstring
How it went:
sent,failed,skippedorqueued, as the notifier records it; an open set. - sent_atinteger or null
Epoch milliseconds. When the notification was sent; null when it was not sent.
An instant: epoch milliseconds, UTC.
- 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.
- active_statestring or null
systemd’s
ActiveStateof the unit when the incident opened. - sub_statestring or null
systemd’s
SubStateof the unit when the incident opened. - resultstring or null
systemd’s
Resultof the unit when the incident opened; null when it was not reported (the unit was active or had not run). - exit_codeinteger or null
The unit’s exit status when the incident opened (systemd’s
ExecMainStatus, or the signal number whenresultissignalorcore-dump); null when not reported. - state_changed_atinteger or null
Epoch milliseconds. When the unit’s state last changed, as it stood when the incident opened; null when not known.
An instant: epoch milliseconds, UTC. - active_entered_atinteger or null
Epoch milliseconds. When the unit last entered
active, as it stood when the incident opened; null when it has not since it was loaded.An instant: epoch milliseconds, UTC. - inventory_atinteger or null
Epoch milliseconds. When the agent reported the inventory this state was read from, at most one system-info interval before the incident opened.
An instant: epoch milliseconds, UTC.
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 422invalid_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 422invalid_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.