Retrieves active alerts from Mimir for the caller's scope, paginated and sorted
by startsAt descending (fingerprint as tiebreaker for stable pagination).
Scope follows the same three modes as /alerts/totals:
organization_idomitted → caller's full hierarchy (cross-tenant fan-out).organization_id=X→ single tenantX.organization_id=X&include=descendants→Xplus its sub-tree.
All filter params support multiple values (repeat the param): values within
the same filter are matched as OR; different filters AND together. Example:
?severity=critical&severity=warning&alertname=CVE-2024-1234 returns
CVE-2024-1234 alerts that are critical or warning.
Per-tenant failures during fan-out (timeout, 5xx) are non-fatal: the rest of the
result is returned and the failure is reported in the warnings array.
Query parameters
-
Target organization ID. Optional for all roles except Customer (where it is ignored).
-
Set to
descendantstogether withorganization_idto drill down on a sub-tree.Value is
descendants. -
1-based page number.
Minimum value is
1. Default value is1. -
Page size. Default 50, max 100.
Minimum value is
1, maximum value is100. Default value is50. -
Filter alerts by state. Supports multiple values.
Values are
active,suppressed, orunprocessed. -
Filter alerts by severity label. Supports multiple values.
Values are
critical,warning, orinfo. -
Filter alerts by system_key label. Supports multiple values.
-
Filter alerts by alertname label (the alert "type" — e.g.
HighCPU,DiskFull,CVE-2024-1234). Supports multiple values.
curl \
--request GET 'https://collect.your-domain.com/api/alerts' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"code": 200,
"message": "alerts retrieved successfully",
"data": {
"alerts": [
{}
],
"pagination": {
"page": 1,
"page_size": 20,
"total_count": 156,
"total_pages": 8,
"has_next": true,
"has_prev": false,
"next_page": 2,
"prev_page": 42,
"sort_by": "name",
"sort_direction": "asc"
},
"warnings": [
"string"
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
{
"code": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
{
"code": 500,
"message": "internal server error",
"data": {}
}