Skip to main content

Create Schedule

Create a new on-call schedule.

A Schedule determines the time periods that users are On-Call.

For more information see the API Concepts Document.

External Documentation

To learn more, visit the PagerDuty documentation.

Basic Parameters

ParameterDescription
Schedule DescriptionThe description of the schedule.
Schedule LayersA list of schedule layers.An array of schedule layers containing the following format:
  • id:
  • start:This field is required.
  • end:The end time of this layer. If null, the layer does not end.
  • usersThe ordered list of users on this layer. The position of the user on the list determines their order in the layer.This field is required.
  • restrictions:An array of restrictions for the layer. A restriction is a limit on which period of the day or week the schedule layer can accept assignments. Restrictions respect the time_zone parameter of the request.
  • rotation_virtual_start:The effective start time of the layer. This can be before the start time of the schedule.This field is required.
  • rotation_turn_length_seconds:The duration of each on-call shift in seconds.This field is required.
  • name:The name of the schedule layer.
Schedule NameThe name of the schedule.
Schedule Time ZoneThe time zone of the schedule.

Advanced Parameters

ParameterDescription
Final Schedule NameThe name of the subschedule.
Final Schedule Rendered Coverage PercentageThe percentage of the time range covered by this layer. Returns null unless since or until are set.
Final Schedule Rendered Schedule EntriesThis is a list of entries on the computed layer for the current time range. Since or until must be set in order for this field to be populated.
OverflowAny on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow=true is passed. This parameter defaults to false.For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z:
  • If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T10:00:00Z and end of 2011-06-01T14:00:00Z.
  • If you do pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z.
Overrides Subschedule NameThe name of the subschedule.
Overrides Subschedule Rendered Coverage PercentageThe percentage of the time range covered by this layer. Returns null unless since or until are set.
Overrides Subschedule Rendered Schedule EntriesThis is a list of entries on the computed layer for the current time range. Since or until must be set in order for this field to be populated.

Example Output

{
"summary": "Response Example",
"value": {
"schedule": {
"description": "Rotation schedule for engineering",
"escalation_policies": [
{
"html_url": "https://subdomain.pagerduty.com/escalation_policies/PT20YPA",
"id": "PT20YPA",
"self": "https://api.pagerduty.com/escalation_policies/PT20YPA",
"summary": "Another Escalation Policy",
"type": "escalation_policy_reference"
}
],
"final_schedule": {
"name": "Final Schedule",
"rendered_schedule_entries": []
},
"html_url": "https://subdomain.pagerduty.com/schedules/PI7DH85",
"id": "PI7DH85",
"name": "Daily Engineering Rotation",
"overrides_subschedule": {
"name": "Overrides",
"rendered_schedule_entries": []
},
"schedule_layers": [
{
"id": "PG68P1M",
"name": "Layer 1",
"rendered_schedule_entries": [],
"restrictions": [
{
"duration_seconds": 32400,
"start_time_of_day": "08:00:00",
"type": "daily_restriction"
}
],
"rotation_turn_length_seconds": 86400,
"rotation_virtual_start": "2015-11-06T20:00:00-05:00",
"start": "2015-11-06T20:00:00-05:00",
"users": [
{
"user": {
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF",
"id": "PEYSGVF",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"summary": "PagerDuty Admin",
"type": "user_reference"
}
}
]
}
],
"self": "https://api.pagerduty.com/schedules/PI7DH85",
"summary": "Daily Engineering Rotation",
"teams": [],
"time_zone": "America/New_York",
"type": "schedule",
"users": [
{
"html_url": "https://subdomain.pagerduty.com/users/PEYSGVF",
"id": "PEYSGVF",
"self": "https://api.pagerduty.com/users/PEYSGVF",
"summary": "PagerDuty Admin",
"type": "user_reference"
}
]
}
}
}

Workflow Library Example

Create Schedule with Pagerduty and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop