Skip to content

Get the alert expression field catalog

GET
/api/v1/alert-rules/metric-catalog
curl --request GET \
--url http://localhost:3000/api/v1/alert-rules/metric-catalog \
--header 'X-API-Key: <X-API-Key>'

Every field an alert expression may name, with its value type, unit, admitted operators and allowed values, plus one entry per device label key in the caller’s organization. The builder in the web UI composes expressions from this list.

x-organization-id
string format: uuid

UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.

Media typeapplication/json
object
fields
required

Every field an expression may name, including one device.label.<key> entry per label key the caller’s organization’s devices carry.

Array<object>
object
field
required

The DSL identifier, exactly as written in an expression.

string
kind
required

metric: a telemetry value; attribute: a device property.

string
Allowed values: metric attribute
valueType
required
string
Allowed values: number string
unit
required

percent fields (cpu, memory, disk) compare against 0–100, never bytes.

string
Allowed values: percent count seconds none
operators
required

The comparison operators the parser accepts for this field.

Array<string>
Allowed values: > >= < <= = !=
allowedValues

For enumerated attributes (device.status): the only values that can match.

Array<string>
keyPrefix

Set on the device.label.<key> entries: the prefix the label key follows. Any key under this prefix is accepted on write, not only the ones listed.

string
labelKeys
required

The caller’s organization’s device label keys, as used in the label entries.

Array<string>
Example
{
"fields": [
{
"field": "cpu",
"kind": "metric",
"valueType": "number",
"unit": "percent",
"operators": [
"=",
"!="
],
"allowedValues": [
"ONLINE",
"OFFLINE",
"PENDING",
"ERROR"
],
"keyPrefix": "device.label."
}
],
"labelKeys": [
"environment",
"site"
]
}