v1

latestOpenAPI 3.1.02026-07-2687120159.0 KB

Get an alert rule

Get a single alert rule by its ID.

get/v1/alert-rules/{rule_id}

Path parameters

rule_idstring required
Example:ar_0Kx4mNpQ8rWvYb2dFgHjLs

The rule_id must be a prefixed ID (e.g. ar_0Kx4mNpQ8rWvYb2dFgHjLs).

Response

Alert rule retrieved successfully.

idstring required

Alert rule ID

namestring required

Alert rule name

project_idstring nullable

Project ID

metric'turn_latency_p50' | 'turn_latency_p95' | 'api_errors' | 'function_errors' | 'call_crashes' | 'call_volume' required

Metric to monitor.

operator'>' | '<' | '>=' | '<=' required

Comparison operator used by the alert rule.

threshold_valueinteger required

Threshold value

window_duration'5m' | '10m' | '60m' required

Evaluation window duration. Allowed values: 5m, 10m, or 60m.

enabledboolean required

Whether the alert is enabled

current_state'ok' | 'alert' | 'no_data' | 'unknown'

Current state of an alert rule.

sincestring date-time nullable

When the current state started

last_evaluated_atstring date-time nullable

Last evaluation timestamp

current_valueinteger nullable

Current metric value

created_atstring date-time required

Creation timestamp

updated_atstring date-time required

Last update timestamp

Example response

{
  "id": "ar_0Kx4mNpQ8rWvYb2dFgHjLs"
}