Operations on the draft schedule's base and priority track are executed through the Operations endpoint:

POST /channels/:id/draft/operations

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)


Multiple Operations

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:

GET /channels/:id/draft/operations

The full schedule (including the three tracks) of the draft channel after that specific operation was applied is included in the resource:

GET /channels/:id/draft/operations/:operation_id

The draft's schedule can be reverted to a specific operation by calling:

POST /channels/:id/draft/operations/:operation_id/revert

This is a destructive call. When this request succeeds, all the operations that were executed after it are destroyed.