Skip to main content

metrics_incidents_services

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

Overview

Namemetrics_incidents_services
TypeResource
Idpagerduty.analytics.metrics_incidents_services

Fields

The following fields are returned by SELECT queries:

Currently the response only returns data for services that match the filters and have data.

NameDatatypeDescription
aggregate_unitstringThe time unit to aggregate metrics by. If no value is provided, the metrics will be aggregated for the entire period. (example: day)
dataarray
filtersobjectAccepts 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
time_zonestringThe time zone to use for the results and grouping. (example: Etc/UTC)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_analytics_metrics_incidents_serviceselectProvides aggregated metrics for incidents aggregated into units of time by service.

Example metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Some metric definitions can be found in our Knowledge Base.
Data can be aggregated by day, week or month in addition to by service, or provided just as a collection of aggregates for each service in the dataset for the entire period. If a unit is provided, each row in the returned dataset will include a 'range_start' timestamp.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
<!-- theme: info -->
> A team_ids or service_ids filter is required for user-level API keys or keys generated through an OAuth flow. Account-level API keys do not have this requirement.
<!-- theme: info -->
> Note: Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.

Scoped OAuth requires: analytics.read

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

SELECT examples

Provides aggregated metrics for incidents aggregated into units of time by service.

Example metrics include Seconds to Resolve, Seconds to Engage, Snoozed Seconds, and Sleep Hour Interruptions. Some metric definitions can be found in our Knowledge Base.
Data can be aggregated by day, week or month in addition to by service, or provided just as a collection of aggregates for each service in the dataset for the entire period. If a unit is provided, each row in the returned dataset will include a 'range_start' timestamp.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
<!-- theme: info -->
> A team_ids or service_ids filter is required for user-level API keys or keys generated through an OAuth flow. Account-level API keys do not have this requirement.
<!-- theme: info -->
> Note: Analytics data is updated once per day. It takes up to 24 hours before new incidents appear in the Analytics API.

Scoped OAuth requires: analytics.read

SELECT
aggregate_unit,
data,
filters,
time_zone
FROM pagerduty.analytics.metrics_incidents_services
;