Skip to main content

List On Calls

List the on-call entries during a given time range.

An on-call represents a contiguous unit of time for which a User will be on call for a given Escalation Policy and Escalation Rules.

Parameters

ParameterDescription
EarliestThis will filter on-calls such that only the earliest on-call for each combination of escalation policy, escalation level, and user is returned. This is useful for determining when the "next" on-calls are for a given set of filters.
Schedule IDsFilters the results, showing only on-calls for the specified schedule IDs. If null is provided in the array, it includes permanent on-calls due to direct user escalation targets.
SinceThe start of the time range over which you want to search. If an on-call period overlaps with the range, it will be included in the result. Defaults to current time. The search range cannot exceed 3 months.
Time ZoneTime zone in which dates in the result will be rendered.
UntilThe end of the time range over which you want to search. If an on-call period overlaps with the range, it will be included in the result. Defaults to current time. The search range cannot exceed 3 months, and the until time cannot be before the since time.
User IDsFilters the results, showing only on-calls for the specified user IDs.

Example Output

{
"summary": "Response Example",
"value": {
"limit": 25,
"more": false,
"offset": 0,
"oncalls": [
{
"end": "2015-03-07T15:28:51-05:00",
"escalation_level": 2,
"escalation_policy": {
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA",
"id": "PT20YPA",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"summary": "Engineering Escalation Policy",
"type": "escalation_policy_reference"
},
"schedule": {
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"id": "PI7DH85",
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"summary": "Daily Engineering Rotation",
"type": "schedule_reference"
},
"start": "2015-03-06T15:28:51-05:00",
"user": {
"html_url": "https://subdomain.pagerduty.com/users/PT23IWX",
"id": "PT23IWX",
"self": "https://api.pagerduty.com/users/PT23IWX",
"summary": "Tim Wright",
"type": "user_reference"
}
}
],
"total": null
}
}

Workflow Library Example

List on Calls with Pagerduty and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop