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 underdata.item:
data.items, with pagination in meta:
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.{ "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
can_read_assets on the Project
Results are sorted by
key.
data.items[] of definition objects, plus meta.
Create a definition
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
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
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.
data.item — the updated definition object.
Delete a definition
can_manage_assets on the Project
{ "ok": 1 }
Activate or deactivate a definition
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.
data.item — the definition object with the new is_active.
Instances
An instance is one occurrence of an alarm. Athreshold rule with labels_by has one instance per distinct label value. A staleness rule has one instance per offline device.
List instances
can_read_assets on the Project, or can_read on the instance’s asset
Results are sorted newest first by
opened_at.
data.items[] of instance objects, plus meta.
List active instances
process_state active. Accepts ack_state, alarm_def_id, asset_id, page, limit, and ids.
Get an instance
Instance object
Acknowledge an instance
acknowledged_by. Acknowledging stops re-notification for the instance.
data.item — the instance object with ack_state acknowledged.
Shelve an instance
shelved_until. It unshelves automatically at that time.
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
400 alarm instance is not shelved when the instance is not shelved.
data.item — the instance object.
→ Operator guide: Silences and shelving
Matchers
Silences and inhibitions select alarm instances by theirlabels 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.
Silences
A silence mutes notifications for matching alarms betweenstarts_at and ends_at. The alarms still fire and show on the Board.
List silences
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
can_manage_assets on the Project
data.item):
Get, update, or delete a silence
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 matchtarget_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
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
can_manage_assets on the Project
data.item):
Get, update, or delete an inhibition
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
Related
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