v1

latestOpenAPI 3.0.22026-07-144652931.4 MB
Analytics

Get aggregated incident data

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 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 and is generally within 24 hours under normal conditions.

Scoped OAuth requires: analytics.write

post/analytics/metrics/incidents/all

Headers

Acceptstring required

The Accept header is used as a versioning header.

Content-Type'application/json' required

Request body

time_zonestring

The time zone to use for the results and grouping. Must be in tzdata format. See list of accepted values here.

order'asc' | 'desc'

The order in which the results were sorted; asc for ascending, desc for descending.

order_bystring

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.

Example request

{
  "filters": {
    "created_at_start": "2024-01-01T00:00:00+05:00",
    "created_at_end": "2024-02-01T00:00:00Z",
    "urgency": "high",
    "major": true,
    "min_ackowledgements": 1,
    "min_timeout_escalations": 1,
    "min_manual_escalations": 1,
    "team_ids": [
      "P373JQQ",
      "PAECHJV",
      "P7SYGW6"
    ],
    "service_ids": [
      "PSEJLIN",
      "PSLWBL8",
      "PT4KHLX"
    ],
    "escalation_policy_ids": [
      "PDJXDF3",
      "PG4EHNS"
    ],
    "priority_ids": [
      "PC8O0L3",
      "PX01HJD",
      "P5FK83M"
    ],
    "priority_names": [
      "P1",
      "P2",
      "P3"
    ],
    "pd_advance_used": true
  },
  "time_zone": "Etc/UTC",
  "order_by": "created_at",
  "aggregate_unit": "day"
}

Response

OK

time_zonestring

The time zone to use for the results and grouping. Must be in tzdata format. See list of accepted values here.

order'asc' | 'desc'

The order in which the results were sorted; asc for ascending, desc for descending.

order_bystring

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.

Example response

{
  "filters": {
    "created_at_start": "2024-01-01T00:00:00+05:00",
    "created_at_end": "2024-02-01T00:00:00Z",
    "urgency": "high",
    "major": true,
    "min_ackowledgements": 1,
    "min_timeout_escalations": 1,
    "min_manual_escalations": 1,
    "team_ids": [
      "P373JQQ",
      "PAECHJV",
      "P7SYGW6"
    ],
    "service_ids": [
      "PSEJLIN",
      "PSLWBL8",
      "PT4KHLX"
    ],
    "escalation_policy_ids": [
      "PDJXDF3",
      "PG4EHNS"
    ],
    "priority_ids": [
      "PC8O0L3",
      "PX01HJD",
      "P5FK83M"
    ],
    "priority_names": [
      "P1",
      "P2",
      "P3"
    ],
    "pd_advance_used": true
  },
  "time_zone": "Etc/UTC",
  "order_by": "created_at",
  "aggregate_unit": "day"
}