Skip to main content

raw_incidents

Creates, updates, deletes, gets or lists a raw_incidents resource.

Overview

Nameraw_incidents
TypeResource
Idpagerduty.analytics.raw_incidents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringIncident ID
escalation_policy_idstringID of the escalation policy the incident was assigned to.
incident_type_idstringID of the Incident Type.
priority_idstringID of the incident's priority level.
resolved_by_user_idstringID of the user who resolved the incident.
service_idstringID of the service that the incident triggered on.
team_idstringID of the team the incident was assigned to.
escalation_policy_namestringName of the escalation policy the incident was assigned to.
incident_type_namestringThe name of the Incident Type.
priority_namestringThe user-provided short name of the priority.
resolved_by_user_namestringName of the user who resolved the incident.
service_namestringName of the service that the incident triggered on.
team_namestringName of the team the incident was assigned to.
acknowledged_user_idsarrayThe IDs of the users who acknowledged the incident.
acknowledged_user_namesarrayThe names of the users who acknowledged the incident.
acknowledgement_countintegerTotal count of acknowledgements in the incident.
active_user_countintegerTotal number of responders who either acknowledged the incident or accepted a responder request.
assigned_user_idsarrayThe IDs of the users who were assigned the incident.
assigned_user_namesarrayThe names of the users who were assigned the incident.
assignment_countintegerTotal count of instances where responders were assigned an incident (including through reassignment or escalation).
auto_resolvedbooleanWhether or not the incident resolved automatically, either via an integration or [auto-resolved in PagerDuty](https:​//support.pagerduty.com/docs/configurable-service-settings#auto-resolution).
business_hour_interruptionsintegerTotal number of unique interruptions during business hours; 8am-6pm Mon-Fri, based on the user’s time zone.
created_atstringTimestamp of when the incident was created.
descriptionstringThe incident description
engaged_secondsintegerTotal engaged time across all responders for this incident. 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.
engaged_user_countintegerTotal number of users who engaged (acknowledged, accepted responder request) in the incident.
escalation_countintegerTotal count of instances where an incident is escalated between responders assigned to an escalation policy.
incident_numberintegerThe PagerDuty incident number.
joined_user_idsarrayThe IDs of the users who either acknowledged the incident or accepted a responder request.
joined_user_namesarrayThe names of the users who either acknowledged the incident or accepted a responder request.
majorbooleanAn incident is classified as a [major incident](https:​//support.pagerduty.com/docs/operational-reviews#major-incidents) if it has one of the two highest priorities, or if multiple responders are added and acknowledge the incident.
manual_escalation_countintegerTotal count of manual escalations in the incident.
off_hour_interruptionsintegerTotal number of unique interruptions during off hours; 6pm-10pm Mon-Fri and all day Sat-Sun, based on the user’s time zone.
priority_orderintegerThe numerical value used to sort priorities. Higher values are higher priority.
reassignment_countintegerTotal count of reassignments in the incident.
resolved_atstringTimestamp of when the incident was resolved.
seconds_to_engageintegerA 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.
seconds_to_first_ackintegerTime between the start of an incident, and the first responder to acknowledge.
seconds_to_mobilizeintegerTime between the start of an incident, and the last additional responder to acknowledge. If an incident has one or no responders, the value will be null.
seconds_to_resolveintegerTime from when an incident was triggered until it was resolved.
sleep_hour_interruptionsintegerTotal number of unique interruptions during sleep hours; 10pm-8am every day, based on the user’s time zone.
snoozed_secondsintegerTotal seconds the incident has been snoozed for.
statusstringThe incident status. Can be one of triggered, acknowledged, or resolved.
timeout_escalation_countintegerTotal count of timeout escalations in the incident.
total_interruptionsintegerTotal number of unique interruptions in the incident.
total_notificationsintegerTotal number of notifications sent for the incident.
updated_atstringTimestamp of when the incident was last updated by the analytics process. Does not match the updated_at for an incident returned by the standard REST api incidents endpoint.
urgencystringNotification level
user_defined_effort_secondsintegerThe total response effort in seconds, [as defined by the user](https:​//support.pagerduty.com/docs/editing-incidents#edit-incident-duration).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidProvides enriched incident data and metrics for a single incident.<br /><br />Example metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https:​//support.pagerduty.com/docs/insights#incidents-list).<br /><br /><!-- theme: info --><br />> 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.<br /><br />Scoped OAuth requires: analytics.read<br />
listselectProvides enriched incident data and metrics for multiple incidents.<br /><br />Example metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https:​//support.pagerduty.com/docs/insights#incidents-list).<br /><br /><!-- theme: info --><br />> 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.<br /><!-- theme: info --><br />> 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.<br /><br />Scoped OAuth requires: analytics.write<br />

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe ID of the resource.

SELECT examples

Provides enriched incident data and metrics for a single incident.<br /><br />Example metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Metric definitions can be found in our [Knowledge Base](https:​//support.pagerduty.com/docs/insights#incidents-list).<br /><br /><!-- theme: info --><br />> 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.<br /><br />Scoped OAuth requires: analytics.read<br />

SELECT
id,
escalation_policy_id,
incident_type_id,
priority_id,
resolved_by_user_id,
service_id,
team_id,
escalation_policy_name,
incident_type_name,
priority_name,
resolved_by_user_name,
service_name,
team_name,
acknowledged_user_ids,
acknowledged_user_names,
acknowledgement_count,
active_user_count,
assigned_user_ids,
assigned_user_names,
assignment_count,
auto_resolved,
business_hour_interruptions,
created_at,
description,
engaged_seconds,
engaged_user_count,
escalation_count,
incident_number,
joined_user_ids,
joined_user_names,
major,
manual_escalation_count,
off_hour_interruptions,
priority_order,
reassignment_count,
resolved_at,
seconds_to_engage,
seconds_to_first_ack,
seconds_to_mobilize,
seconds_to_resolve,
sleep_hour_interruptions,
snoozed_seconds,
status,
timeout_escalation_count,
total_interruptions,
total_notifications,
updated_at,
urgency,
user_defined_effort_seconds
FROM pagerduty.analytics.raw_incidents
WHERE id = '{{ id }}' -- required
;