Alerts
Query, acknowledge, snooze, and comment on alerts triggered by your alert rules.
List alerts
GET /alerts
Auth: Bearer JWT (any role)
| Parameter | Type | Default | Description |
|---|---|---|---|
machine_id | uuid | - | Filter by machine |
severity | string | - | info, warning, critical |
is_acknowledged | boolean | - | Filter by acknowledgment status |
start_date | datetime | - | Filter alerts created after this date |
end_date | datetime | - | Filter alerts created before this date |
page | int | 1 | Page number |
page_size | int | 20 | Max 100 |
curl "https://api.haltless.io/api/v1/alerts?severity=critical&is_acknowledged=false" \
-H "Authorization: Bearer YOUR_TOKEN"
{
"items": [
{
"id": "uuid",
"machine_id": "uuid",
"severity": "critical",
"message": "Temperature exceeded 85°C threshold",
"metric_name": "temperature",
"metric_value": 87.3,
"threshold_value": 85.0,
"is_acknowledged": false,
"acknowledged_by": null,
"acknowledged_at": null,
"snoozed_until": null,
"created_at": "2026-04-04T10:30:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 20
}
Get alert statistics
GET /alerts/stats
Auth: Bearer JWT (any role)
{
"total_active": 12,
"critical_count": 3,
"warning_count": 7,
"info_count": 2,
"unacknowledged_count": 8
}
Get a single alert
GET /alerts/{alert_id}
Auth: Bearer JWT (any role)
Acknowledge an alert
POST /alerts/{alert_id}/acknowledge
Auth: Bearer JWT (any role)
curl -X POST https://api.haltless.io/api/v1/alerts/ALERT_ID/acknowledge \
-H "Authorization: Bearer YOUR_TOKEN"
Bulk acknowledge
POST /alerts/bulk/acknowledge
Auth: Bearer JWT (any role)
curl -X POST https://api.haltless.io/api/v1/alerts/bulk/acknowledge \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"alert_ids": ["uuid1", "uuid2", "uuid3"]
}'
{
"acknowledged_count": 3,
"already_acknowledged_count": 0
}
Snooze an alert
POST /alerts/{alert_id}/snooze
Auth: Bearer JWT (any role)
{
"snooze_until": "2026-04-04T14:00:00Z"
}
Alert comments
List comments
GET /alerts/{alert_id}/comments
Add a comment
POST /alerts/{alert_id}/comments
{
"body": "Investigated , root cause is bearing wear. Scheduling replacement."
}
Comment constraints:
- Max body length: 2,000 characters
- Max comments per thread: 500
Alert severity levels
| Level | Description | Typical trigger |
|---|---|---|
info | Informational | Metric slightly above normal |
warning | Attention needed | Metric above warning threshold |
critical | Immediate action required | Metric above critical threshold |