Skip to main content

The schedule sync rule object

A sync rule links a schedule to a sync target, telling us which of the schedule's members should flow into the target's Slack user group.

sync_type decides who is synced: on_call syncs only the people currently on call, while all_users syncs everyone on the schedule. By default every rotation on the schedule is included; set rotation_id to scope the rule to a single rotation. As the schedule's shifts change hands, we keep the target's Slack user group membership in step with the rule.

created_at
string<date-time>
required
Example:

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

id
string
required

Unique identifier of the sync rule

Example:

"01JXYZ000000000000000000CD"

schedule_id
string
required

The schedule this rule belongs to

Example:

"01JXYZ000000000000000000EF"

schedule_sync_target
object
required

A sync target is the link between incident.io and a single Slack user group, used to keep that group's membership in step with who is currently on call.

A target identifies the group by its Slack user group ID and Slack team ID, and remembers whether the incident.io bot should be added to the group so it can manage membership. On its own a target does nothing: you link it to a schedule by creating a schedule sync rule (see the Schedules service), and that rule decides which schedule members flow into the group. As the schedule's shifts change hands, we update the Slack user group to match.

A single target can be referenced by sync rules on several schedules at once; linked_schedules lists every schedule with an active rule pointing at it.

schedule_sync_target_id
string
required

The sync target ID this rule links to

Example:

"01JXYZ000000000000000000AB"

sync_type
enum<string>
required

Which schedule members sync to the user group

Available options:
on_call,
all_users
Example:

"on_call"

updated_at
string<date-time>
required
Example:

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

rotation_id
string

If set, only members of this rotation sync to the user group. When unset, all rotations on the schedule are synced.

Example:

"01JXYZ000000000000000000RT"