Skip to main content

The schedule replica object

created_at
string<date-time>
required

When this schedule replica was first created

Example:

"2021-08-17T13:28:57.801578Z"

id
string
required

Unique identifier of the schedule replica

Example:

"01G0J1EXE7AXZ2C93K61WBPYEH"

replica_fallback_user_id
string
required

The ID of a user in the external provider that will be assigned whenever nobody is on-call in the incident.io schedule. External providers typically require someone to always be on-call, so this user fills gaps where incident.io has no one scheduled.

Example:

"PA7AXXN"

replica_provider
enum<string>
required

The external provider where this schedule is replicated to

Available options:
native,
pagerduty,
opsgenie,
jira
Example:

"pagerduty"

replica_provider_id
string
required

The ID of the schedule in the external provider that this replica syncs to. For PagerDuty this is the schedule ID (e.g. PO8107X), for Opsgenie the schedule ID, and for Jira Service Management the schedule ID.

Example:

"PO8107X"

schedule_id
string
required

The ID of the incident.io schedule that this replica is syncing from

Example:

"01FDAG4SAP5TYPT98WGR2N7W91"

sources
object[]
required

The specific rotation and layer combinations from the schedule that are being replicated. Each source identifies a single layer within a rotation to sync to the external provider.

Example:
[
{
"layer_id": "01G0J1EXE7AXZ2C93K61WBPYNH",
"rotation_id": "01G0J1EXE7AXZ2C93K61WBPYEH"
}
]
updated_at
string<date-time>
required

When this schedule replica was last updated

Example:

"2021-08-17T13:28:57.801578Z"

user_statuses
object[]
required

The mapping status of each incident.io user in the schedule to their corresponding user in the external provider. Users must be mapped for the replica to sync their on-call shifts correctly.

Example:
[
{
"external_user_id": "PJYTRGS",
"user_id": "01G0J1EXE7AXZ2C93K61WBPYEH"
}
]
last_sync_error
string

The most recent error encountered while syncing this replica to the external provider, if any. Common errors include unmapped users or connectivity issues with the external provider. Null if the last sync was successful.

Example:

"Failed to find external user for Milly"

last_synced_at
string<date-time>

When the replica was last successfully synced to the external provider. Null if the replica has never been successfully synced.

Example:

"2023-11-07T13:33:30Z"