Change part of a resource
Either text replacements in its code — [{ "old": "…", "new": "…" }], each old matching exactly once (code is stored formatted: copy old from what GET answered; 409 EDIT_NO_MATCH quotes the closest line) — or a JSON merge patch of its fields (application/merge-patch+json or JSON; null removes a field). One layer changes alone at its own path (frame/intro/title with { "props": { … } }). Checked like PUT.
Authorizations
A Streamloop API key (sl_…). It carries no workspace: send X-Workspace-Id too (400 WORKSPACE_REQUIRED otherwise).
Headers
The revision (ETag) you read — one, or a comma-separated list of which any current one matches — compared strongly (a weak W/"…" tag never matches): refused with 412 PRECONDITION_FAILED if the resource changed since or no longer exists (the problem carries currentRevision, null when it is gone, and for a layer frameRevision: either is taken). A layer takes its own revision or that of the frame/<id> it is in. *: it must exist. Checked atomically with the write: of two writes sent at once with the same revision, one lands and the other is 412.
Retry safely: the key (per caller, workspace, method and path) is taken before the request runs, and its first answer is replayed for 24 hours, with Idempotency-Replayed: true — a repeat sent while the first still runs waits for it. The same key with a different body is 422 IDEMPOTENCY_KEY_REUSED. A 5xx is not kept: the retry runs.
200The workspace to act in. Required with an API key; otherwise the session's own.
Path Parameters
The scene's id (scn_…)
^scn_A resource path, slashes and all: frame/intro, frame/intro/title, source/data/headlines/rows, component/LowerThird, script/show.ts, a type (element/Text) or a list (frame/*)
Response
The answer
What a draft operation answers. summary says what happened in a sentence; value is what a read found.
What was read: a resource (with revision and children), a type (what it takes), or a list
- Option 1 · object
- Option 2 · object
- Option 3 · object
- Option 4 · object
- Option 5 · object
- Option 6 · object
- Option 7 · object
- Option 8 · object[]
A write: where it is stored (a new id is made unique)
A write: the resource's new revision
A layer's write: the revision of the frame/<id> it is in (If-Match takes either)
A write: a unified diff of what changed
The whole draft as this answer saw it: publish takes it