On-Call API › Analytics
Alert analytics
Aggregates over the organization's alerts in a time range: MTTA and MTTR (p50, p90, average), counts per severity and per integration, a time series (hourly up to 48 hours, daily beyond), noise (flapping alerts, alerts resolved without anyone acknowledging them, the noisiest fingerprints), an alerts-per- hour heatmap, notification totals and the load on each responder.
The heatmap and off-hours counts use tz, else the timezone most of the
organization's schedules use, else UTC; range.tz_source says which.
Permission (API-key scope): oncall:alert:read.
Authorization
bearerAuth(oncall:alert:read)apiKeyHeader(oncall:alert: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 severities to include.comparestringAlso compute the totals of a comparison period:previous(the same length immediately before) oryear(the same dates a year earlier).team_idstringOnly this team's alerts.integration_idstringComma-separated integration ids.sourcestringComma-separated integration kinds, for exampleprometheus,grafana.tzstringIANA timezone for the heatmap and off-hours counts.ack_target_secondsintegerThe acknowledgement targetacked_within_targetcounts against, in seconds (1–86400).flap_window_minutesintegerAn alert re-opening within this many minutes of being resolved counts as flapping (1–1440).
Responses
200
The aggregates.
dataAlertAnalytics requiredShow AlertAnalytics properties
rangeAnalyticsRangeShow AnalyticsRange properties
fromstring (date-time)tostring (date-time)Exclusive.granularitystringtzstringtz_sourcestring
ack_target_secondsintegertotalsAlertGroupStatsShow AlertGroupStats properties
alertsintegeracknowledgedintegerresolvedintegerauto_resolvedintegerresolved_without_ackintegerescalatedintegerretriggersintegerflappingintegersuppressedintegerclosed_before_notifyintegeracked_within_targetintegermttaDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
mttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
seriesarray of AlertGroupStats & objectalertsintegeracknowledgedintegerresolvedintegerauto_resolvedintegerresolved_without_ackintegerescalatedintegerretriggersintegerflappingintegersuppressedintegerclosed_before_notifyintegeracked_within_targetintegermttaDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
mttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
bucketstring (date-time)by_severityobject
by_severityarray of AlertGroupStats & objectalertsintegeracknowledgedintegerresolvedintegerauto_resolvedintegerresolved_without_ackintegerescalatedintegerretriggersintegerflappingintegersuppressedintegerclosed_before_notifyintegeracked_within_targetintegermttaDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
mttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
severitystring
by_integrationarray of AlertIntegrationStatsShow AlertIntegrationStats properties
alertsintegeracknowledgedintegerresolvedintegerauto_resolvedintegerresolved_without_ackintegerescalatedintegerretriggersintegerflappingintegersuppressedintegerclosed_before_notifyintegeracked_within_targetintegermttaDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
mttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
integration_idstringEmpty for alerts raised by hand or by another EvoHub product.integration_namestringintegration_typestring
noiseobjectflap_window_minutesintegerflappingintegerresolved_without_ackintegertop_integrationsarray of AlertIntegrationStatsShow AlertIntegrationStats properties
alertsintegeracknowledgedintegerresolvedintegerauto_resolvedintegerresolved_without_ackintegerescalatedintegerretriggersintegerflappingintegersuppressedintegerclosed_before_notifyintegeracked_within_targetintegermttaDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
mttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
integration_idstringEmpty for alerts raised by hand or by another EvoHub product.integration_namestringintegration_typestring
top_fingerprintsarray of objectfingerprintstringtitlestringintegration_idstringalertsintegerresolved_without_ackintegerretriggersintegerflappinginteger
heatmaparray of objectweekdayintegerISO weekday: 1 Monday … 7 Sunday.hourintegeralertsinteger
notificationsobjecttotalintegervoiceintegersmsintegeremailintegerpushintegercalls_unansweredintegersuppressedinteger
respondersarray of objectuser_idstringnotificationsintegervoiceintegersmsintegeremailintegerpushintegercalls_unansweredintegeralerts_notifiedintegerinterruptionsintegeroff_hours_interruptionsintegersleep_hours_interruptionsintegeracknowledgedintegerresolvedintegersuppressedintegerNotifications held back by maintenance or the person's notification schedule.
compareAlertGroupStats & object | null- AlertGroupStats & object
alertsintegeracknowledgedintegerresolvedintegerauto_resolvedintegerresolved_without_ackintegerescalatedintegerretriggersintegerflappingintegersuppressedintegerclosed_before_notifyintegeracked_within_targetintegermttaDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
mttrDurationStatsShow DurationStats properties
countintegerHow many were measured.p50_secondsnumber | nullp90_secondsnumber | nullavg_secondsnumber | null
modestringfromstring (date-time)tostring (date-time)
- null
successboolean required
400
A parameter is invalid; 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/alerts/analytics' \
-H 'Authorization: Bearer <TOKEN>'