Log in

Alerts

Model

Fields

Field

Type

Description

object
"alert"
id
string Unique identifier, prefixed with alrt_.
slug
string URL-safe identifier for the alert.
team_id
string
project_id
string
metric_id
string The metric the monitor was watching.
monitor_id
string The monitor that raised the alert.
monitor_name
string | null
metric_name
string | null
triggered_at
The check that opened the alert. The start of the period, used for ordering and duration.
ended_at
| null When the period ended. Null while the alert is still open.
end_reason
| null Why the period ended. Null while the alert is still open.
created_at
When the alert was recorded. Later than triggered_at when checks were catching up.
series_hash
string The target that opened the alert: one series for each_series, a fixed value for total and any_series.
series_label
string | null The series name for each_series alerts. Null for total and any_series; an any_series alert names its series in trigger_evidence.opened_by.
trigger_value
number The statistic value that matched when the alert opened.
condition_summary
string The rule in words, built from rule_snapshot, for example Average over 1 minute above 1020.
rule_snapshot
MonitorRuleSnapshot The monitor's rule as it stood when the alert opened. Later edits do not change it.
trigger_evidence
AlertTriggerEvidence

List Alerts

Endpoint

List the alerts a metric's monitors have raised.

GET
/v1/projects/:project_id/metrics/:metric_id/alerts

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.
metric_id
string Unique identifier of the metric.

Query Parameters

Field

Type

Description

order_by
string Field the results are sorted by. Alerts sort by when their period opened. Defaults to "triggered_at". Accepted values: "triggered_at".
metric_id
string Return only alerts raised on this metric.
monitor_id
string Return only alerts raised by this monitor.
is_open
string Set true for periods still firing, false for periods that have ended. Accepted values: "true","false","1","0".
time_range
Window to search, relative to now. Ignored when start_at and end_at are sent.
timezone
string IANA timezone the time range is anchored to. Defaults to UTC.
page_id
string Resolve the time range from this page's setting instead of the metric's.
start_at
Start of the window to search, as an ISO 8601 value.
end_at
End of the window to search, as an ISO 8601 value.
limit
number Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200.
after
string Cursor from pagination.next_cursor of a previous response. Returns the resources after that page.
before
string Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page.
sort
string Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc".

Response

200
{
  message: string;
  data: Alert[];
  status: 200;
  error: null;
  pagination: Pagination;
  endpoint: string;
}

Retrieve Alert

Endpoint

Retrieve a single alert.

GET
/v1/projects/:project_id/alerts/:alert_id

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.
alert_id
string Unique identifier of the alert.

Response

200
{
  message: string;
  data: Alert;
  status: 200;
  error: null;
  pagination: null;
  endpoint: string;
}

Referenced Types

ISODateString

An ISO 8601 date-time string returned at the JSON API boundary.

AlertEndReason

recovered
instant
monitor_changed
monitor_paused
monitor_expired
metric_rebuilt
resource_deleted
target_removed

Why an alert ended. recovered: the condition cleared. instant: an instant alert, which ends as it opens. monitor_changed: the monitor's rule was edited. monitor_paused / monitor_expired: the monitor stopped. metric_rebuilt: the metric was rebuilt from its data. resource_deleted: the metric or something it reads from is being deleted. target_removed: the series no longer exists.

MonitorStatistic

count
sum
average
min
max
last
p50
p95
p99
count_unique

What a monitor computes over its window. count, sum and count_unique measure how much happened; the others read a value from the observations in the window.

MonitorOperator

gt
gte
lt
lte
eq
neq

MonitorEmptyWindowHandling

no_value
zero

What a statistic reads when its window holds no data. zero reads 0; no_value reads nothing, so the check neither opens nor closes an alert. count, sum and count_unique always use zero.

MonitorWindowType

rolling
all_time

rolling reads the window_minutes before each check; all_time reads everything up to it.

MonitorScope

total
any_series
each_series

total checks the whole feed as one value. any_series opens one alert while any series matches. each_series checks every series separately.

MonitorTriggerType

immediate
sustained
repeated

When a match opens an alert. immediate on the first matching check; sustained once matches have held for sustained_minutes; repeated after repeat_count matches within repeat_window_minutes.

MonitorAlertMode

spanning
instant

spanning keeps an alert open until the condition clears; instant opens and ends it at once.