List Metric Alert Rules
Returns the calling user's threshold-based metric alert rules. Each rule defines a metric, an operator, a threshold, a sliding window, optional endpoint scope, a cooldown, and one or more notification channels. The evaluator worker (deployed separately) computes each metric every cycle and transitions a rule into firing when the condition holds.
The list is paginated: without page / page_size you get the first 15 rules. Use total to page through the rest.
Query parameters
page int
1-indexed page number. Defaults to
1.page_size int
Items per page. Default
15 (also when ≤0); values above 200 are capped at 200.q string
Optional. Server-side search over rule fields. Filtering is applied before pagination.
status string
Optional. Filter by evaluator status (e.g.
ok, firing, unknown).metric string
Optional. Filter to one metric (e.g.
error_rate_pct).enabled string
Optional.
enabled/true/1 returns only enabled rules; disabled/false/0 returns only disabled. Omit for both.Response (200 OK)
items array<Rule>
The account's rules on this page. Always present;
[] when there are none. See Get Alert for the per-rule field list; as there, a channel's saved secret is answered as ****. List entries additionally carry two derived fields computed only on this endpoint: last_delivered_at (datetime of the most recent notification attempt) and last_delivery_status (delivered | failed | pending); both are omitted while the rule has no notification events.total int
Total rule count across all pages.
page int
The page served: the
page you sent, or 1 when you sent none (or a value below 1).page_size int
The effective page size.
Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.
Errors
401 Unauthorized
Missing auth.
Request
curl "https://api.ngris.com/v1/traffic/alerts?page=1&page_size=15" \
-H "X-API-KEY: <your_api_key>"
Response — 200 OK
{
"items": [
{
"uuid": "019c12ab-1cf9-7acd-9ca4-e05a5284d4d8",
"name": "5xx spike on api",
"metric": "error_rate_pct",
"operator": ">",
"threshold": 1.0,
"window_seconds": 300,
"endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e",
"cooldown_seconds": 600,
"enabled": true,
"status": "ok",
"last_value": 0.04,
"last_evaluated_at": "2026-05-21T12:34:56Z",
"notify_channels": [
{"type": "email", "target": "ops@example.com"}
],
"created_at": "2026-05-20T09:00:00Z",
"updated_at": "2026-05-20T09:00:00Z",
"last_delivered_at": "2026-05-21T08:12:00Z",
"last_delivery_status": "delivered"
}
],
"total": 1,
"page": 1,
"page_size": 15
}
Was this helpful?