Skip to main content
The Alarms API lives on the management API. Every route is scoped to a Project. Set these before running the examples:
All path IDs are UUIDs.

Authentication

Every route requires: Requests with a body also need Content-Type: application/json. On the three create routes (definition, silence, inhibition) you can send an Idempotency-Key header. A retry with the same key returns the result of the first request instead of creating a duplicate. Create responses also carry an X-Command-Id header.

Permissions

Every route requires you to be a member of the Project. Some routes check one more permission: List reads are filtered by permission. Items you cannot read are left out of the list. A single item you cannot read returns 404.

Rate limits

Back off on 429.

Response envelope

Single objects come back under data.item:
Lists come back under data.items, with pagination in meta:
Every list route accepts:
total_items is not an exact count. When a page comes back full, it reports one more than the items seen so far, so total_pages tells you another page exists. Keep paging until a page returns fewer than limit items.
Delete routes return { "ok": 1 } with no data.

Errors

Errors use this envelope with an HTTP 4xx or 5xx status:
Request bodies are strict. A field that is not listed for the route returns 400.

Definitions

List definitions

Permission: can_read_assets on the Project Results are sorted by key.
Response: data.items[] of definition objects, plus meta.

Create a definition

Permission: can_manage_assets on the Project A new definition is active immediately.
condition_cel is required for every kind. staleness rules do not evaluate it, so send "true". Request fields: Validation rules for kind, query_spec, the relative time window in the SQL, and on_no_data are covered in Kinds and conditions. Re-notify and escalation are covered in Notifications. Response: data.item — the new definition object.
The Console’s Test button on a condition runs a dry run that has no public endpoint yet. When you create or update a definition through the API, the query is still checked against the dataspace before the definition is saved.

Get a definition

Permission: can_read_assets on the Project

Definition object

Every field from the create table comes back, plus: Unset optional fields come back as null. wo_cooldown comes back as a duration string such as "24h0m0s".

Update a definition

Permission: can_manage_assets on the Project Send the fields to change, plus _keys: an array naming each field to apply. Only fields listed in _keys are changed. Fields in the body but not in _keys are ignored. A PATCH without _keys returns 400. You can update any field from the create table. The merged result is validated the same way as a create. The query is checked against the dataspace again only when kind or query_spec is in _keys.
Response: data.item — the updated definition object.

Delete a definition

Permission: can_manage_assets on the Project
Response: { "ok": 1 }
To stop a rule but keep its history, deactivate it instead.

Activate or deactivate a definition

Permission: can_manage_assets on the Project No request body. A deactivated rule is not evaluated. Activating a rule also clears any automatic pause the platform applied after the rule repeatedly failed to evaluate.
Response: data.item — the definition object with the new is_active.

Instances

An instance is one occurrence of an alarm. A threshold rule with labels_by has one instance per distinct label value. A staleness rule has one instance per offline device.

List instances

Permission: can_read_assets on the Project, or can_read on the instance’s asset Results are sorted newest first by opened_at.
Response: data.items[] of instance objects, plus meta.

List active instances

Permission: same as List instances Returns only instances with process_state active. Accepts ack_state, alarm_def_id, asset_id, page, limit, and ids.

Get an instance

Permission: same as List instances

Instance object

The two-axis lifecycle and what each state means are covered in Alarms overview.

Acknowledge an instance

Permission: Project member No request body. The caller is recorded as acknowledged_by. Acknowledging stops re-notification for the instance.
Response: data.item — the instance object with ack_state acknowledged.

Shelve an instance

Permission: Project member Shelving pauses an active instance until shelved_until. It unshelves automatically at that time.
Returns 400 when the instance is not active, when shelved_until is in the past, or when it exceeds shelve_max_hours. Response: data.item — the instance object with the shelving fields set.

Unshelve an instance

Permission: Project member No request body. Returns 400 alarm instance is not shelved when the instance is not shelved.
Response: data.item — the instance object. → Operator guide: Silences and shelving

Matchers

Silences and inhibitions select alarm instances by their labels with an array of matchers. An instance matches when every matcher in the array holds.
name must not be empty. A missing label counts as an empty string. An invalid op or regular expression returns 400.
An empty array [] matches every alarm in the Project.

Silences

A silence mutes notifications for matching alarms between starts_at and ends_at. The alarms still fire and show on the Board.

List silences

Permission: can_read_assets on the Project Query parameters: is_active (true or false), page, limit, ids. Results are sorted by starts_at, newest first.

Create a silence

Permission: can_manage_assets on the Project
Response (data.item):

Get, update, or delete a silence

Permission: GET needs can_read_assets. PATCH and DELETE need can_manage_assets. PATCH accepts any create field plus the required _keys array. To end a silence early, turn it off:
GET and PATCH return the silence in data.item. DELETE returns { "ok": 1 }.

Inhibitions

An inhibition mutes notifications for alarms that match target_matchers while an alarm that matches source_matchers is firing. Use equal_labels to require that source and target share the same values for those labels.

List inhibitions

Permission: can_read_assets on the Project Query parameters: is_active (true or false), page, limit, ids. Results are sorted by created_at, newest first.

Create an inhibition

Permission: can_manage_assets on the Project
Response (data.item):

Get, update, or delete an inhibition

Permission: GET needs can_read_assets. PATCH and DELETE need can_manage_assets. PATCH accepts any create field plus the required _keys array:
GET and PATCH return the inhibition in data.item. DELETE returns { "ok": 1 }.

Notification events

Alarm state changes can be delivered through notification subscriptions. Subscribe to these event keys: Silences and inhibitions mute these notifications for matching alarms. → Full guide: Notifications

Alarms overview

Concepts, kinds, lifecycle, and priority

Kinds and conditions

Event, threshold, and staleness rules, SQL, CEL, and timing

Silences and shelving

Shelve instances, silence and inhibit notifications

Troubleshooting

When alarms do not fire, resolve, or notify