Every variable a notification template can reference.
const url = 'https://example.com/api/v1/notification-channels/template-variables';const options = {method: 'GET', 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 GET \ --url https://example.com/api/v1/notification-channels/template-variables \ --header 'Authorization: Bearer <token>'Served rather than documented so the editor’s list and the renderer’s context cannot disagree — they are the same list.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The template variables, with what each one means and whether every alert carries it
One name a notification template may reference.
object
Whether every alert carries it. A variable that is not always present is undefined when
absent: it renders as empty text, and {{ name | default("…") }} supplies a fallback.
What the value means.
The name to write between {{ }}.
Examplegenerated
[ { "always_present": true, "description": "example", "name": "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 below Admin
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" }}