On-Call API › Alerts
Count alerts by status
GET/api/v1/alerts/stats
How many of the organization's alerts there are in total and per status, over all time.
Permission (API-key scope): oncall:alert:read.
Authorization
bearerAuth(oncall:alert:read)apiKeyHeader(oncall:alert:read)
Responses
200
The counts.
dataAlertStats requiredShow AlertStats properties
totalintegertriggeredintegeracknowledgedintegerresolvedinteger
successboolean required
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.
Example request
curl -X GET 'https://evohub.io/api/v1/alerts/stats' \
-H 'Authorization: Bearer <TOKEN>'