On-Call API › Analytics
Incident analytics
Aggregates over the organization's incidents in a time range: counts, MTTR,
time to identify, time to first status-page publication, postmortem rates,
a time series (hourly up to 48 hours, daily beyond), a breakdown per severity
and the incidents themselves (incidents_truncated is true when the list was
cut short). Computed in UTC.
Incidents carry no team, integration or source, so team_id,
integration_id and source are refused.
Permission (API-key scope): oncall:incident:read.
Authorization
bearerAuth(oncall:incident:read)apiKeyHeader(oncall:incident:read)
Parameters
Query parameters
fromstringStart of the range: a date (YYYY-MM-DD, start of that UTC day) or an RFC 3339 instant. Givefromandtotogether, or neither for the last 30 UTC days including today.tostringEnd of the range: a date (the last UTC day included) or an RFC 3339 instant (exclusive). At most 366 days afterfrom.severitystringComma-separated incident severities to include.comparestringAlso compute the totals of a comparison period:previous(the same length immediately before) oryear(the same dates a year earlier).
Responses
200
The aggregates.
dataIncidentAnalytics requiredShow IncidentAnalytics properties
rangeAnalyticsRangeShow AnalyticsRange properties
fromstring (date-time)tostring (date-time)Exclusive.granularitystringtzstringtz_sourcestring
totalsIncidentGroupStats & objectopenedintegerresolvedintegermttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
time_to_identifyDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
published_to_status_pageintegertime_to_first_publicationDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
postmortemPostmortemRate & objecteligibleintegerpublishedintegerratenumber | nulltime_to_postmortemDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
high_severity_postmortemPostmortemRateShow PostmortemRate properties
eligibleintegerpublishedintegerratenumber | null
resolved_in_rangeintegerIncidents resolved in the range, whenever they started.
seriesarray of objectbucketstring (date-time)openedintegerresolvedinteger
by_severityarray of IncidentGroupStats & objectopenedintegerresolvedintegermttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
time_to_identifyDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
published_to_status_pageintegertime_to_first_publicationDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
postmortemPostmortemRate & objecteligibleintegerpublishedintegerratenumber | nulltime_to_postmortemDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
high_severity_postmortemPostmortemRateShow PostmortemRate properties
eligibleintegerpublishedintegerratenumber | null
severitystring
incidentsarray of objectidstringnumberintegertitlestringseveritystringstatusstringstarted_atstring (date-time)identified_atstring (date-time) | nullresolved_atstring (date-time) | nullalertsintegerfirst_alert_acknowledged_atstring (date-time) | nullpublished_to_status_page_atstring (date-time) | nullpostmortem_statusstringpostmortem_published_atstring (date-time) | null
incidents_truncatedbooleancompareIncidentGroupStats & object | null- IncidentGroupStats & object
openedintegerresolvedintegermttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
time_to_identifyDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
published_to_status_pageintegertime_to_first_publicationDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
postmortemPostmortemRate & objecteligibleintegerpublishedintegerratenumber | nulltime_to_postmortemDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
high_severity_postmortemPostmortemRateShow PostmortemRate properties
eligibleintegerpublishedintegerratenumber | null
modestringfromstring (date-time)tostring (date-time)
- null
successboolean required
400
A parameter is invalid or not supported here; each problem is listed in details (VALIDATION_FAILED).
errorobject requiredcodestring requiredmessagestring requireddetailsarray of object requiredfieldstringmessagestring
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/incidents/analytics' \
-H 'Authorization: Bearer <TOKEN>'