Preview
Preview the schedule entries that would be generated by a proposed schedule configuration.
Use this endpoint before updating a schedule to see who would be on-call if you
saved the supplied schedule payload. The request body uses the same schedule
payload shape as Update schedule, so you can send the configuration you intend
to save without persisting it.
The response uses the same schedule_entries envelope as List schedule entries:
scheduled contains entries produced by the rotation rules, overrides
contains matching overrides, and final contains the effective schedule after
overrides are applied.
The preview window is bounded to keep requests predictable. If you ask for more
than 91 days, the response is capped to 91 days from entry_window_start.
Authorizations
API key from your incident.io dashboard (Settings → API keys)
Path Parameters
The ID of the schedule to preview entries for.
"01FDAG4SAP5TYPT98WGR2N7W91"
Body
{
"annotations": {
"incident.io/terraform/version": "version-of-terraform"
},
"config": {
"rotations": [
{
"effective_from": "2021-08-17T13:28:57.801578Z",
"handover_start_at": "2021-08-17T13:28:57.801578Z",
"handovers": [
{ "interval": 1, "interval_type": "hourly" }
],
"id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layers": [
{
"id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"name": "Layer 1"
}
],
"name": "My Rotation",
"scheduling_mode": "fair",
"users": [
{
"email": "bob@example.com",
"id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"slack_user_id": "USER123"
}
],
"working_interval": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
],
"working_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
},
"holidays_public_config": { "country_codes": ["abc123"] },
"name": "Primary On-call Schedule",
"team_ids": ["01JPQA75EPNEES4479P16P4XAB"],
"timezone": "America/Los_Angeles"
}The end of the window to preview entries for. Defaults to four weeks after entry_window_start.
"2021-01-08T00:00:00Z"
The start of the window to preview entries for. Defaults to now.
"2021-01-01T00:00:00Z"
Response
OK response.
The schedule entries for a window of time, grouped by where they come from.
scheduled are the entries produced by the schedule's rotation rules before
any overrides are taken into account. overrides are the one-off changes that
apply within the window. final is the effective schedule after overrides
have been merged in — this is normally the list to use when working out who
is on-call.
{
"final": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "owner",
"slack_user_id": "U02AYNF2XJM"
}
}
],
"overrides": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "owner",
"slack_user_id": "U02AYNF2XJM"
}
}
],
"scheduled": [
{
"end_at": "2021-08-17T13:28:57.801578Z",
"entry_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"fingerprint": "01G0J1EXE7AXZ2C93K61WBPYEH",
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH",
"start_at": "2021-08-17T13:28:57.801578Z",
"user": {
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "owner",
"slack_user_id": "U02AYNF2XJM"
}
}
]
}