API reference
Alarm channels
Alarm channels: the Slack, Microsoft Teams and webhook destinations alarms notify; their destinations are write-only.
Its operations need the scopes channels.edit, channels.view or channels.delete.
The Alarm channel object
Attributes
- uuidstring
The channel’s uuid.
- typestring
The channel’s type:
slack,teamsorwebhook. - namestring
The channel’s display name.
- activeboolean
Whether the channel is switched on.
- signing_secret_setboolean
Whether a webhook channel holds a signing secret; always false for the other types. The secret is never returned.
- signing_secret_rotated_atinteger or null
Epoch milliseconds. When the signing secret was last replaced; null if never.
An instant: epoch milliseconds, UTC. - created_atinteger or null
Epoch milliseconds. When the channel was created.
An instant: epoch milliseconds, UTC.
Create an alarm channel
POST/v1/alarm-channels
Creates a Slack, Microsoft Teams or regular webhook channel from its destination URL. The URL is write-only: it is never returned. A webhook channel is given a signing secret, which is never returned either.
Needs the scope channels.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.
Body parameters
- typestringRequired
The channel’s type:
slack,teamsorwebhook. It cannot be changed afterwards.Values:slackteamswebhook(an open set: new values may be added) - namestringRequired
The channel’s display name, up to 255 characters.
- webhook_urlstring (uri)Required
The destination: a public HTTPS URL (for Slack the incoming-webhook URL), up to 2048 characters. It is write-only: no answer returns it.
- activeboolean or nullOptional
Whether the channel is switched on; defaults to on.
Returns
201 Created:
The created alarm channel.
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.
Update an alarm channel
PUT/v1/alarm-channels/{channel_uuid}
Changes the fields sent: the name, a new destination URL and whether the channel is switched on. The type cannot be changed. Switching a channel on re-checks its saved destination.
Needs the scope channels.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
- channel_uuidstring (uuid)Required
The uuid of the alarm channel in the path.
Body parameters
- namestring or nullOptional
The channel’s display name, up to 255 characters.
- webhook_urlstring (uri) or nullOptional
A new destination: a public HTTPS URL, up to 2048 characters. It is write-only: omit it to keep the saved one.
- activeboolean or nullOptional
Whether the channel is switched on. Switching a channel on re-checks its saved destination.
Returns
200 OK:
The alarm channel after the update.
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.
Get an alarm channel
GET/v1/alarm-channels/{channel_uuid}
Returns one alarm channel. The destination (the webhook URL) and the signing secret are never returned: only whether a signing secret is set.
Needs the scope channels.view.
Path parameters
- channel_uuidstring (uuid)Required
The uuid of the alarm channel in the path.
Returns
200 OK:
The alarm channel.
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 alarm channels
GET/v1/alarm-channels
Returns the organisation’s alarm channels. A channel’s destination and signing secret are never returned. 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 channels.view.
Query parameters
- 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) - per_pageinteger or nullOptional
The page size, 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 alarm channels.
Each item of the page:
- uuidstring
The channel’s uuid.
- typestring
The channel’s type:
slack,teamsorwebhook. - namestring
The channel’s display name.
- activeboolean
Whether the channel is switched on.
- signing_secret_setboolean
Whether a webhook channel holds a signing secret; always false for the other types. The secret is never returned.
- created_atinteger or null
Epoch milliseconds. When the channel was created.
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.
Delete an alarm channel
DELETE/v1/alarm-channels/{channel_uuid}
Deletes the channel. A channel an alarm policy still notifies is refused: remove it from the policy first. The answer has no body.
Needs the scope channels.delete.
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
- channel_uuidstring (uuid)Required
The uuid of the alarm channel in the path.
Returns
204 No Content:
The alarm channel was deleted; there is no body.
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.
Send a test message to an alarm channel
POST/v1/alarm-channels/{channel_uuid}/test
Sends one test message to the channel’s saved destination. The call is refused when the saved destination is no longer allowed, and is limited to a few a minute.
Needs the scope channels.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
- channel_uuidstring (uuid)Required
The uuid of the alarm channel in the path.
Returns
200 OK:
The test message was sent.
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.