v2

latestOpenAPI 3.1.02026-08-013435189.7 KB
playlists

Apply playlist operations

Batched spec mutation. Ops apply in order; each sees the state produced by earlier ops. On any validation failure, nothing is written. Does not affect running streams — preparation happens on stream launch. Resources are permanently bound to the workspace that created them and cannot be moved between workspaces.

post/playlists/{id}/operations

Path parameters

idstring required

Resource identifier.

Headers

Idempotency-Keystring

Optional client-generated key. A repeated request with the same key replays the original response (within 24h) instead of re-executing — safe retries.

Request body

basedOnVersioninteger nullable

If set, reject the batch with CONFLICT when playlists.version has advanced past this value.

playlistIdstring required

Response

Successful response.

copiedFromstring nullable
createdAtstring date-time required
hasUnpublishedChangesboolean required

snapshot != nil && Playlist.version > snapshot.version. Returns false during the B-11 STREAMING+no-snapshot window — deliberate: the stream is live but nothing has been published yet.

idstring required
kind'video' | 'audio' required
liveVersioninteger required

PlaylistSnapshot.version — Playlist.version frozen at the last LIVE write. Returns 0 when no snapshot exists OR during the B-11 STREAMING+no-snapshot transient window (WriteInitialPlaylistSnapshot retry).

mode'sequential' | 'shuffle' required
publishStatus'IDLE' | 'PENDING' | 'PREPARING' | 'FAILED' | 'NOT_LIVE' required

Workflow-state derivation. NB-13: PREPARING wins over PENDING even when a concurrent edit advances Playlist.version while a publish is preparing.

streamIDstring required
updatedAtstring date-time required
versioninteger required

Bumped by 1 per committed spec mutation batch. Used for optimistic concurrency and as the snapshot handle for PreparePlaylistWorkflow.