---
title: "Get aggregated incident data"
method: POST
path: "/analytics/metrics/incidents/all"
tags: ["Analytics"]
---

# Get aggregated incident data

`POST /analytics/metrics/incidents/all`

Provides aggregated enriched metrics for incidents.

The provided metrics are aggregated by day, week, month using the aggregate_unit parameter, or for the entire period if no aggregate_unit is provided.

<!-- theme: info -->
> A `team_ids` or `service_ids` filter is required for [user-level API keys](https://support.pagerduty.com/docs/using-the-api#section-generating-a-personal-rest-api-key) or keys generated through an OAuth flow. Account-level API keys do not have this requirement.
<!-- theme: info -->
> **Note:** Data availability reflects [pipeline processing cycles](https://support.pagerduty.com/main/docs/insights#:~:text=Data%20Update%20Schedule) and is generally within 24 hours under normal conditions.

Scoped OAuth requires: `analytics.write`

## Headers

- `Accept` string, required
- `Content-Type` 'application/json', required

## Request body

- AnalyticsModel
  - `filters` object — Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results.
    - `created_at_start` string — Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with created_at_end is one year.
    - `created_at_end` string — Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with created_at_start is one year.
    - `urgency` 'high' | 'low' — Any incidents whose urgency does not match the provided string will be omitted from the results.
    - `major` boolean — A boolean flag including whether results should contain *only* [major incidents](https://support.pagerduty.com/docs/operational-reviews#major-incidents), or exclude major incidents. If no value is provided all incidents will be included.
    - `min_ackowledgements` integer — An integer that sets the requirement for the minimum number of acknowledgements to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 acknowledgement. If no value is provided, all incidents will be included.
    - `min_timeout_escalations` integer — An integer that sets the requirement for the minimum number of timeout escalations to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 timeout escalation. If no value is provided, all incidents will be included.
    - `min_manual_escalations` integer — An integer that sets the requirement for the minimum number of manual escalations to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 manual escalation. If no value is provided, all incidents will be included.
    - `team_ids` string[] — An array of team IDs. Only incidents related to these teams will be included in the results. If omitted, all teams the requestor has access to will be included in the results.
    - `service_ids` string[] — An array of service IDs. Only incidents related to these services will be included in the results. If omitted, all services the requestor has access to will be included in the results.
    - `escalation_policy_ids` string[] — An array of escalation policy IDs. Only incidents related to these escalation policies will be included in the results. If omitted, all escalation policies the requestor has access to will be included in the results.
    - `priority_ids` string[] — An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.
    - `priority_names` string[] — An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.
    - `pd_advance_used` boolean — If true, only incidents where PD Advance was used will be included in the results, and vice versa. If omitted, all incidents will be included.
  - `time_zone` string — The time zone to use for the results and grouping. Must be in tzdata format. See list of accepted values [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
  - `order` 'asc' | 'desc' — The order in which the results were sorted; asc for ascending, desc for descending.
  - `order_by` string — The column that was used for ordering the results.
  - `aggregate_unit` 'day' | 'week' | 'month', nullable — The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period.

## Response `200`

OK

- object
  - `data` object[]
    - `mean_assignment_count` integer — Mean count of instances where responders were assigned an incident (including through reassignment or escalation) or accepted a responder request.
    - `mean_engaged_seconds` integer — Mean engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed.
    - `mean_engaged_user_count` integer — Mean number of users who engaged with an incident. *Engaged* is defined as acknowledging an incident or accepting a responder request in it.
    - `mean_seconds_to_engage` integer — A measure of *people response time*. This metric measures the time from the first user engagement (acknowledge or responder accept) to the last. This metric is only used for incidents with **multiple responders**; for incidents with one or no engaged users, this value is null.
    - `mean_seconds_to_first_ack` integer — Mean time between the start of an incident, and the first responder to acknowledge.
    - `mean_seconds_to_mobilize` integer — Mean time between the start of an incident, and the last additional responder to acknowledge. For incidents with one or no engaged users, this value is null.
    - `mean_seconds_to_resolve` integer — Mean time from when an incident was triggered until it was resolved.
    - `mean_user_defined_engaged_seconds` integer — Mean engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed. This metric uses the incident response effort values that [users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration), if they exist.
    - `p50_seconds_to_first_ack` integer — Median time between the start of an incident, and the first responder to acknowledge.
    - `p50_seconds_to_resolve` integer — Median time from when an incident was triggered until it was resolved.
    - `p75_seconds_to_first_ack` integer — 75th percentile for the time between the start of an incident, and the first responder to acknowledge.
    - `p75_seconds_to_resolve` integer — 75th percentile for the time when an incident was triggered until it was resolved.
    - `p90_seconds_to_first_ack` integer — 90th percentile for the time between the start of an incident, and the first responder to acknowledge.
    - `p90_seconds_to_resolve` integer — 90th percentile for the time when an incident was triggered until it was resolved.
    - `p95_seconds_to_first_ack` integer — 95th percentile for the time between the start of an incident, and the first responder to acknowledge.
    - `p95_seconds_to_resolve` integer — 95th percentile for the time when an incident was triggered until it was resolved.
    - `range_start` string — Start of the date range for which the metrics were calculated. Only included when an aggregate unit is specified in the request.
    - `service_id` string — ID of the service. Only included when aggregating by service. Not included when aggregating by all.
    - `service_name` string — Name of the service. Only included when aggregating by service. Not included when aggregating by all.
    - `team_id` string — ID of the team to which the incident was assigned. Not included when aggregating by all.
    - `team_name` string — Name of the team to which the incident was assigned. Not included when aggregating by all.
    - `total_business_hour_interruptions` integer — Total number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone.
    - `total_engaged_seconds` integer — Total engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed.
    - `total_escalation_count` integer — Total count of instances where an incident is escalated between responders assigned to an escalation policy.
    - `total_incident_count` integer — The total number of incidents that were created.
    - `total_incidents_acknowledged` integer — The total count of assigned incidents acknowledged. Only explicit incident acknowledgment counts; reassign, resolve, and escalation actions do not imply acknowledgement.
    - `total_incidents_auto_resolved` unknown
    - `total_incidents_manual_escalated` integer — The total count of incidents that were manually escalated.
    - `total_incidents_reassigned` integer — The total count of incidents that were reassigned.
    - `total_incidents_timeout_escalated` integer — The total count of incidents that were escalated due to timeouts.
    - `total_interruptions` integer — Total number of unique interruptions.
    - `total_notifications` integer — The total count of incident notifications sent via email, SMS, phone call and push.
    - `total_off_hour_interruptions` integer — Total number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone.
    - `total_sleep_hour_interruptions` integer — Total number of unique interruptions during sleep hours. Sleep hours: 10pm-8am every day, based on the user’s time zone.
    - `total_snoozed_seconds` integer — Total number of seconds incidents were snoozed.
    - `total_user_defined_engaged_seconds` integer — Total engaged time across all responders. Engaged time is measured from the time a user engages with an incident (by acknowledging or accepting a responder request) until the incident is resolved. This may include periods in which the incidents were snoozed. This metric uses the edited incident response effort values that [users have defined](https://support.pagerduty.com/docs/edit-incidents#edit-incident-duration), if they exist.
    - `up_time_pct` number — The percentage of time in the defined date range that the service was not interrupted by a [major incident](https://support.pagerduty.com/docs/operational-reviews#major-incidents). Only included when aggregating by team, escalation policy, service, or all services.
  - `filters` object — Accepts a set of filters to apply to the Incidents before aggregating. Any incidents that do not match the included filters will be omitted from the results.
    - `created_at_start` string — Accepts an ISO8601 DateTime string. Any incidents with a created_at less than this value will be omitted from the results. The maximum supported time range in conjunction with created_at_end is one year.
    - `created_at_end` string — Accepts an ISO8601 DateTime string. Any incidents with a created_at greater than or equal to this value will be omitted from the results. The maximum supported time range in conjunction with created_at_start is one year.
    - `urgency` 'high' | 'low' — Any incidents whose urgency does not match the provided string will be omitted from the results.
    - `major` boolean — A boolean flag including whether results should contain *only* [major incidents](https://support.pagerduty.com/docs/operational-reviews#major-incidents), or exclude major incidents. If no value is provided all incidents will be included.
    - `min_ackowledgements` integer — An integer that sets the requirement for the minimum number of acknowledgements to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 acknowledgement. If no value is provided, all incidents will be included.
    - `min_timeout_escalations` integer — An integer that sets the requirement for the minimum number of timeout escalations to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 timeout escalation. If no value is provided, all incidents will be included.
    - `min_manual_escalations` integer — An integer that sets the requirement for the minimum number of manual escalations to occur on an incident. For example, setting this to 1 will return only incidents that have at least 1 manual escalation. If no value is provided, all incidents will be included.
    - `team_ids` string[] — An array of team IDs. Only incidents related to these teams will be included in the results. If omitted, all teams the requestor has access to will be included in the results.
    - `service_ids` string[] — An array of service IDs. Only incidents related to these services will be included in the results. If omitted, all services the requestor has access to will be included in the results.
    - `escalation_policy_ids` string[] — An array of escalation policy IDs. Only incidents related to these escalation policies will be included in the results. If omitted, all escalation policies the requestor has access to will be included in the results.
    - `priority_ids` string[] — An array of priority IDs. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.
    - `priority_names` string[] — An array of user-defined priority names. Only incidents with these priorities will be included in the results. If omitted, all priorities will be included in the results.
    - `pd_advance_used` boolean — If true, only incidents where PD Advance was used will be included in the results, and vice versa. If omitted, all incidents will be included.
  - `time_zone` string — The time zone to use for the results and grouping. Must be in tzdata format. See list of accepted values [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
  - `order` 'asc' | 'desc' — The order in which the results were sorted; asc for ascending, desc for descending.
  - `order_by` string — The column that was used for ordering the results.
  - `aggregate_unit` 'day' | 'week' | 'month', nullable — The time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period.

## Other responses

- `400` — Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.
- `429` — Too many requests have been made, the rate limit has been reached.

---

[API](https://skmtc.net/pagerduty/apis/rest-api.md) · [All operations](https://skmtc.net/pagerduty/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pagerduty/rest-api/revisions/b679a8f3f02c/schema)
