Operations on the draft schedule's base and priority track are executed through the Operations endpoint:
Basic operations include:
- Pushing an item to a track (pushTrackItem)
- Removing an item from a track (removeTrackItem)
- Updating a track item's details (updateTrackItem)
- Grouping items into a block (groupItems)
- Ungrouping a program block (ungroupBlock)
The Operations endpoint can process a list of operations transactionally.
If one of the operations fails to execute or lead to an invalid state, all the previously executed operations are discarded.
The example on the right represents moving an item from the base track to the priority track.
Reverting to a previous operation
All the operations executed on a draft can be retrieved through:
The full schedule (including the three tracks) of the draft channel after that specific operation was applied is included in the resource:
The draft's schedule can be reverted to a specific operation by calling:
This is a destructive call. When this request succeeds, all the operations that were executed after it are destroyed.