コンテンツにスキップ

list_alert_history

GET
/api/v1/alerts/history
curl --request GET \
--url https://example.com/api/v1/alerts/history \
--header 'Authorization: Bearer <token>'
limit
integer format: int64

Max rows (1–1000, default 100).

before
string

Keyset cursor, first half: the last row’s recorded_at, as an RFC 3339 timestamp.

before_id
string format: uuid

Keyset cursor, second half: the same row’s id. Send both. A whole flush of alerts is written in one transaction and therefore shares one recorded_at, so a timestamp-only cursor lands inside that group and skips its remaining rows. Omitting it is still accepted and means “strictly before that instant”, which is what an older client sends.

since
string

Only transitions recorded at or after this RFC 3339 timestamp.

Bounds recorded_at (when the row was written), not at_unix_ms (when the alert fired), so one index serves the ordering, the cursor and the range. The two differ by the ingest writer’s flush latency — under a second — so a row may sit marginally outside the window its displayed time suggests.

until
string

Only transitions recorded at or before this RFC 3339 timestamp. Bounds recorded_at; see since.

severity
string

Comma-separated severities (info, warning, critical, unreachable); empty or absent means every severity. Node-down is unreachable since ADR-277 — rows recorded before it carry critical. An unknown token is rejected rather than ignored — a dropped token would silently widen the answer to everything.

state
string

Comma-separated node states; empty or absent means every state.

resolved
boolean

false for fires only, true for clears only. Omit for both. A roll-up row is not a clear, so false includes it; phase tells the two apart.

phase
string

Comma-separated phases (fired, cleared, rolled_up): what each row records. A rolled_up row is an alert grouped into an outage while it stayed open. Empty or absent means every phase; an unknown token is rejected.

metric
string

Only transitions whose metric name, or whose alert name in English or Japanese, contains this text (case-insensitive): Node finds __liveness__, “Node not responding”.

node_id
string format: uuid

Only transitions about this node. Rows about something other than a node (a poller pool) are excluded by construction.

node_q
string

Only transitions about nodes whose current name contains this text (case-insensitive). Distinct from node_id, which names exactly one node.

group_id
string format: uuid

Only transitions about nodes in this folder group or any group beneath it.

site
string

Comma-separated ids of Site folders: only transitions about nodes whose site — the nearest Site folder at or above their folder, as the Site column shows it — is one of them. A Site nested inside another is its own site. Combines with group_id (both must hold).

outage_row
string format: uuid

The id of a History row that opened an outage: only the other nodes’ up/down rows grouped under that row’s node while the outage lasted — the nodes the outage held. Narrows the other filters rather than replacing them.

A page of history rows, newest first; empty when this deployment keeps no history

Media typeapplication/json
Array

An alert-history row plus its title and its port’s current name.

object
at_unix_ms
required
integer format: int64
check
required
string format: uuid
direction
One of:
null
id
required

This row’s identity, and the second half of the keyset cursor — pass it as before_id beside before. Also the stable key for a list: no other field, or combination of them, is unique.

string format: uuid
ifindex

The SNMP ifIndex of the port this was about, for a per-interface metric (ADR-076).

None for a node-level alert and for every row written before ADR-076 shipped — both mean “no port was involved”, which is why the column is nullable rather than defaulted (there is no ifIndex value free to mean “none”; 0 is a real one on some agents).

integer | null format: int32
metric

Metric the check measured (e.g. icmp_rtt_ms, or the liveness sentinel). None for rows recorded before this was captured (legacy) so the WebUI can show “—”.

string | null
node

The node this transition was about; null when the subject is not a node — read subject_kind first. It is non-null exactly when subject_kind is node.

string | null format: uuid
observed_value

Observed sample value that committed the transition (threshold checks only).

number | null format: double
recorded_at
required

Insertion time as an RFC 3339 timestamp, and the first half of the keyset cursor: the WebUI passes the last row’s recorded_at as before and its id as before_id to fetch the next (older) page. Distinct from at_unix_ms (the event time).

⚠️ Both halves are required, and this is not defensive. recorded_at defaults to now(), which in PostgreSQL is the transaction timestamp, and [AlertHistoryStore::record_batch] writes a whole flush as one multi-row INSERT — so every row of a flush shares a recorded_at to the microsecond. A page boundary landing inside a flush and paging on the timestamp alone silently skipped that flush’s remaining rows. A fleet-wide event is exactly when a flush is large and exactly when someone is reading this log.

string
resolved
required
boolean
rolled_up
required

This row records an open alert being grouped into an outage (ADR-270): one that had paged on its own, or a member moving into a wider outage from the one it sat in (Inc.4). It is still open: the row is neither a fire nor a resolve, and resolved is false.

boolean
root_cause

The node this alert was grouped under when the row was written (ADR-270): the border of the outage it sat in, or its own node for a down node’s other alerts (ADR-087). None when it was not grouped, and on every row recorded before this was kept.

string | null format: uuid
row

The row of a vendor table this was about — a memory pool, a CPU, a sensor — as the row key its samples carry (ADR-143). None for an alert about the node as a whole or about a port, and for every row recorded before a table row could alert on its own.

integer | null format: int32
row_name

What that row was called when the alert fired, e.g. I/O. None when it had no name.

string | null
severity
required

How serious an alert is. Variants are declared low → high so the derived Ord ranks Unreachable above Critical above Warning above Info.

🚨 A new variant goes at the end only if it is the new top. The order is the ranking, the OpenAPI enum lists the variants in this order, and the WebUI’s SEVERITIES array mirrors it.

string
Allowed values: info warning critical unreachable
state
required

The current state of a monitored node or check.

string
Allowed values: ok warning critical unknown unreachable maintenance
subject_kind
required

What the transition was about.

string
Allowed values: node pool meraki_org config_remote
subject_name

The subject’s name, for a subject identified by name rather than by id (a poller pool).

string | null
threshold_value

The bound crossed for the committed severity (threshold checks only).

number | null format: double
if_name

The port’s name, as it is called now (ADR-196 decision 6) — not necessarily what it was called when this row was written. See [ActiveAlertView::if_name].

string | null
title

What the alert is called, in English (ADR-196). See [ActiveAlertView::title].

string | null
Example
[
{
"direction": "above",
"severity": "info",
"state": "ok",
"subject_kind": "node"
}
]

A cursor or range bound is not RFC 3339, severity/state/phase is not one of the listed values, or site names something that is not a Site folder

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks the read permission

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

The requested node_id, group_id or site is outside the caller’s scope, or outage_row names no History row that opened an outage of a node the caller can see

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}