Skip to main content

Alerts

Alerts are raised when a machine metric crosses a configured threshold. Use these endpoints to review alerts, acknowledge or snooze them, and add comments. All endpoints require a bearer JWT and the Alerts page (the alert history needs its own page, below). A member limited to some machines sees only the alerts of those machines. To configure what triggers an alert, see Alert Rules.

An alert's life​

A reading past a rule's line, or far from the machine's normal, is out of range; one back in range starts the count over. Three in a row open an alert, one per machine and metric, which is sent to your channels; if it gets worse while open it is updated and sent again. You can snooze an open alert: it stays open but leaves the active count and escalation until the time you set, up to 30 days. Someone acknowledging it closes it, and the next breach raises a new alert. When the metric comes back inside its line, past a small margin, it resolves by itself; out of range again within 15 minutes, the same alert reopens. An open alert not acknowledged within an escalation policy's wait is sent to that policy's channel, once per policy, while it is still open, and a critical alert whose rule is set to open a work order opens one. A composite rule's alert opens on its first match, closes when the rule stops matching, and does not reopen.A reading past a rule's line, or far from the machine's normal, is out of range; one back in range starts the count over. Three in a row open an alert, one per machine and metric, which is sent to your channels; if it gets worse while open it is updated and sent again. You can snooze an open alert: it stays open but leaves the active count and escalation until the time you set, up to 30 days. Someone acknowledging it closes it, and the next breach raises a new alert. When the metric comes back inside its line, past a small margin, it resolves by itself; out of range again within 15 minutes, the same alert reopens. An open alert not acknowledged within an escalation policy's wait is sent to that policy's channel, once per policy, while it is still open, and a critical alert whose rule is set to open a work order opens one. A composite rule's alert opens on its first match, closes when the rule stops matching, and does not reopen.

Endpoints​

MethodPathDescription
GET/api/v1/alertsList alerts
GET/api/v1/alerts/statsAggregated alert counts
GET/api/v1/alerts/stats/raisedAlerts raised over a period
GET/api/v1/alerts/{alert_id}Get a single alert
POST/api/v1/alerts/{alert_id}/acknowledgeAcknowledge an alert
POST/api/v1/alerts/bulk/acknowledgeAcknowledge many alerts
POST/api/v1/alerts/{alert_id}/snoozeSnooze an alert
GET/api/v1/alerts/{alert_id}/commentsList comments
POST/api/v1/alerts/{alert_id}/commentsAdd a comment
GET/api/v1/alert-historyWhat happened to alerts: raised, escalated, acknowledged

List alerts​

GET /api/v1/alerts

Query parameters

ParameterTypeDescription
alert_iduuidJust this alert (what a portal notification links to)
machine_iduuidFilter by machine
severitystringOne of info, warning, critical
is_acknowledgedbooleanFilter by acknowledgment state
snoozedbooleantrue for alerts that are snoozed now, false for those that are not. Leave it out to ignore snoozing
searchstringText in the alert's message, metric name or machine name (up to 200 characters)
include_resolvedbooleanInclude alerts closed because the metric recovered (default false: the list shows open alerts)
resolvedbooleantrue for only the resolved alerts, false for only the unresolved. When given, include_resolved is ignored
start_datedatetimeAlerts created on or after this time
end_datedatetimeAlerts created on or before this time
pageintegerPage number (default 1)
page_sizeintegerItems per page (default 20, max 100)

Response: 200 OK

{
"items": [
{
"id": "b7e2...",
"tenant_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"severity": "critical",
"metric_name": "temperature",
"trigger_value": 87.3,
"threshold_value": 85.0,
"message": "Temperature exceeded the critical threshold.",
"is_acknowledged": false,
"acknowledged_at": null,
"acknowledged_by": null,
"snoozed_until": null,
"resolved_at": null,
"created_at": "2026-08-07T10:30:00Z",
"composite_rule_id": null,
"machine_name": "CNC Mill 3",
"playbook": {
"id": "c3d4...",
"scope": "machine",
"metric_name": "temperature",
"safety_note": "Let the housing cool before touching it.",
"check_steps": ["Check the coolant flow", "Check the fan"],
"likely_cause": "Blocked coolant filter.",
"fix": "Replace the filter and flush the line."
}
}
],
"pagination": {
"total": 1,
"page": 1,
"page_size": 20
}
}

resolved_at is set when the metric returned inside its thresholds, and is null while the alert is open. composite_rule_id is set on alerts raised by a composite rule. machine_name is the machine's display name; it can be null in the response to an acknowledge or a snooze.

Each alert carries playbook, the recommended next step it takes (shortened above; the full object is in Alert Playbooks), or null when none matches it.

Alert statistics​

GET /api/v1/alerts/stats

Counts the alerts that need attention now, by severity: not acknowledged, not resolved because the metric recovered, and not snoozed at the moment.

{
"total_active": 12,
"critical_count": 3,
"warning_count": 7,
"info_count": 2
}

Alerts raised over a period​

GET /api/v1/alerts/stats/raised?days=90

Counts, by severity, the alerts raised in the last days days (required, 1–366). Unlike /alerts/stats, an alert still counts after it is acknowledged, snoozed or resolved: this is what happened in the period, not what needs attention now. The ROI page uses it to estimate avoided downtime for the selected period.

{
"days": 90,
"critical_count": 4,
"warning_count": 19,
"info_count": 31
}

Get a single alert​

GET /api/v1/alerts/{alert_id}

Returns one alert, or 404 if it does not exist or is not accessible to you.

Acknowledge an alert​

POST /api/v1/alerts/{alert_id}/acknowledge

Requires an operator or administrator role. Marks the alert acknowledged and records who acknowledged it. Returns 409 Conflict if the alert was already acknowledged, and 404 if it does not exist or is not accessible to you.

Response: 200 OK (the updated alert)

Acknowledge many alerts​

POST /api/v1/alerts/bulk/acknowledge

Requires an operator or administrator role. Acknowledge 1 to 1,000 alerts in one call.

{
"alert_ids": [
"b7e2...",
"c8f3...",
"d9a4..."
]
}

Response: 200 OK

{
"acknowledged_count": 2,
"already_acknowledged_ids": ["c8f3..."],
"not_found_ids": []
}

Snooze an alert​

POST /api/v1/alerts/{alert_id}/snooze

Requires an operator or administrator role. Suppresses the alert until the given time. The snooze_until value must be in the future and no more than 30 days out (422 otherwise). Returns 200 OK with the updated alert, or 404 if the alert does not exist or is not accessible to you.

{
"snooze_until": "2026-08-07T14:00:00Z"
}

Comments​

GET /api/v1/alerts/{alert_id}/comments lists the comment thread for an alert. POST /api/v1/alerts/{alert_id}/comments adds a comment (body up to 2,000 characters).

{
"body": "Investigated - bearing wear. Scheduling a replacement."
}

Response: 201 Created

{
"id": "e1a2...",
"author_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"author_name": "Jordan Rivera",
"body": "Investigated - bearing wear. Scheduling a replacement.",
"created_at": "2026-08-07T11:00:00Z",
"updated_at": "2026-08-07T11:00:00Z"
}

The list response wraps comments in an items array with a total count.

Alert history​

GET /api/v1/alert-history

A page of what has happened to your alerts, newest first: each alert's raising, each escalation (one per policy that escalated it), and its acknowledgement, as separate events. Needs the Alert History page; a member limited to some machines sees only theirs.

ParameterTypeDescription
kindstringfired, escalated or acknowledged
severitystringinfo, warning or critical
machine_iduuidOne machine's alerts
searchstringText in the alert's message, metric or machine name (up to 200 characters)
start_date, end_datedatetimeWhen the event happened (not when the alert was raised)
pageintegerPage number (default 1)
page_sizeintegerItems per page (default 20, max 100)

Response: 200 OK

{
"items": [
{
"id": "acknowledged:3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"kind": "acknowledged",
"occurred_at": "2026-08-07T11:05:00Z",
"alert_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"severity": "critical",
"message": "Spindle temperature above 85 °C",
"metric_name": "spindle_temperature",
"trigger_value": 91.2,
"threshold_value": 85.0,
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"machine_name": "CNC Mill 3",
"actor_name": "Jordan Rivera",
"policy_name": null
}
],
"pagination": { "total": 1, "page": 1, "page_size": 20 }
}

actor_name is set on acknowledged events (null if that person was since removed) and policy_name on escalated ones.

Severity levels​

LevelDescription
infoInformational
warningMetric above its warning threshold
criticalMetric above its critical threshold