Send one test notification through a channel, now (ADR-192).
const url = 'https://example.com/api/v1/notification-channels/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/test';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/notification-channels/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/test \ --header 'Authorization: Bearer <token>'The template preview’s sample alert, rendered with this channel’s template, with [TEST] at
the start of the subject. A webhook or PagerDuty body also carries "test": true; a JSM or
email body, which is text, starts with a line saying it is a test. Sent once, with no retry,
and recorded in the delivery log like any other delivery.
A PagerDuty or JSM channel then closes the incident it opened, so the on-call is notified once
and nothing is left open. Works on a disabled channel, so one can be checked before it is
switched on.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Channel id
Responses
Section titled “Responses”The test was attempted; whether the channel accepted it is in the body
What a test send did (ADR-192). A failure is reported in the 200 response, as the template preview does: the request worked, and what it found out is that the channel does not.
object
Whether the incident the test opened was closed again. null for a channel kind with no
incident (webhook, email), and when the delivery itself failed.
Whether the channel accepted the test notification.
The first failure, as the channel reported it. Never contains the channel’s URL.
Examplegenerated
{ "closed": true, "delivered": true, "error": "example"}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks ManageSystem
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No such channel
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}This core has no write side (skeleton mode)
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}