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

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

Workflow Library Example

List on Calls with Pagerduty and Send Results Via Email

Preview this Workflow on desktop