Skip to content

Get an action rule

GET
/action-rules/{name}
curl --request GET \
--url https://example.com/api/v1/action-rules/example

Returns one action rule by name or uuid. Gated by rule:read.

name
required

The rule’s name or uuid

string

The rule’s name or uuid

OK

Media type application/json

A rule that decides when a notification about an alarm is sent, and to which targets.

object
$schema

A URL to the JSON Schema for this object.

string format: uri
created_at
required
string format: date-time
description
string
enabled
required
boolean
id
required

The rule’s uuid, the stable form of name

string
label
string
name
required
string
notification_type

The notification type it sends, by name; absent sends the official one for the transition (alarm-raised, alarm-cleared)

string
notification_type_id

That type’s uuid

string
official
required

Shipped with Omniglass by the boot seed: only its enabled switch, its opt-out allowance and the targets added to it are the operator’s, and it cannot be deleted

boolean
on
required

The alarm transitions it fires on: raised, cleared, or both

Array<string> | null
opt_out_allowed
required

Whether a member of a group it targets may opt out of it for themselves (:optOut); false by default, so an on-call page cannot be opted out of unless an admin allows it

boolean
targets
required

The notification targets it sends to, by name

Array<string> | null
updated_at
required
string format: date-time
when

The predicate over the alarm facts (the action expression site); absent always holds

string

Example

{
"$schema": "/api/v1/schemas/ActionRuleBody.json"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}