Episodes_UpdateEpisodeDraft
const url = 'https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes/example/draft';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"example","drawing":{"pieces":[{"startSeconds":1,"endSeconds":1,"keep":true,"tags":["example"]}],"subtasks":[{"startSeconds":1,"endSeconds":1,"label":"example","review":"REVIEW_UNSPECIFIED","origin":"ORIGIN_UNSPECIFIED"}]},"baseRevision":1,"base":{"pieces":[{"startSeconds":1,"endSeconds":1,"keep":true,"tags":["example"]}],"subtasks":[{"startSeconds":1,"endSeconds":1,"label":"example","review":"REVIEW_UNSPECIFIED","origin":"ORIGIN_UNSPECIFIED"}]},"baseSplit":"example","etag":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes/example/draft \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "example", "drawing": { "pieces": [ { "startSeconds": 1, "endSeconds": 1, "keep": true, "tags": [ "example" ] } ], "subtasks": [ { "startSeconds": 1, "endSeconds": 1, "label": "example", "review": "REVIEW_UNSPECIFIED", "origin": "ORIGIN_UNSPECIFIED" } ] }, "baseRevision": 1, "base": { "pieces": [ { "startSeconds": 1, "endSeconds": 1, "keep": true, "tags": [ "example" ] } ], "subtasks": [ { "startSeconds": 1, "endSeconds": 1, "label": "example", "review": "REVIEW_UNSPECIFIED", "origin": "ORIGIN_UNSPECIFIED" } ] }, "baseSplit": "example", "etag": "example" }'Saves the take’s draft as drawn: replaces the drawing and its base, or creates the draft (allow_missing). The person holding the take’s live edit lease saves it, and so does any caller with write access, a person or an API key, while no other person holds one; another person’s live lease is FAILED_PRECONDITION, naming them. A stale etag is ABORTED (read the draft again); a drawing past the bounds is INVALID_ARGUMENT. Nothing is applied: the dataset’s head keeps the take as it is. (— api-linter: core::0134::method-signature=disabled aip.dev/not-precedent: a draft is saved whole, with no field mask. —)
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The account id.
The dataset id.
The episode id.
Query Parameters
Section titled “Query Parameters ”Create the draft when the take has none; without it, NOT_FOUND.
Request Body required
Section titled “Request Body required ”An edit of a take drawn and not yet in a version (docs/design/episode-drafts-and-reediting.md): one per take, read the same through every dataset that reads the take. It is never applied to the dataset: head keeps the take as recorded, and only a version made from a Publish preview holds the edit. Written by whoever holds the take’s edit lease (Episode.lease), or, while no other person holds one, by any caller with write access, a person or an API key. It stays when its author’s lease ends, for whoever edits the take next, and through a re-ingest of the take.
Served by qds-api.
object
Accounts/{account}/datasets/{dataset}/episodes/{episode}/draft
What a version published from it holds.
object
The take as pieces, in time order and not overlapping, within the recording; at most 512 kept. Stored end to end over the recording: what lies between the pieces sent is stored as dropped pieces.
A stretch of the take as drawn.
object
Start, in seconds from the start of the recording.
End, in seconds.
Whether the stretch is kept: one kept piece is a trim, two or more a split.
Tags the episode this piece becomes carries (a marker split’s labels), beside the take’s own. Kept only on a kept piece; at most 64, each non-empty, without surrounding whitespace, at most 1024 bytes.
Subtask spans, bounded as UpdateEpisodes bounds Episode.subtasks.
One subtask span (QUA-1794).
object
Start, in seconds from the start of the recording.
End, in seconds.
The subtask’s one name (also one of the episode’s tags).
Proposed, accepted or rejected.
Who proposed it.
The Episode.revision the drawing began on.
The editor as read when drawing began (the take’s trim and subtasks then), so a return can tell what moved under the drawing.
object
The take as pieces, in time order and not overlapping, within the recording; at most 512 kept. Stored end to end over the recording: what lies between the pieces sent is stored as dropped pieces.
A stretch of the take as drawn.
object
Start, in seconds from the start of the recording.
End, in seconds.
Whether the stretch is kept: one kept piece is a trim, two or more a split.
Tags the episode this piece becomes carries (a marker split’s labels), beside the take’s own. Kept only on a kept piece; at most 64, each non-empty, without surrounding whitespace, at most 1024 bytes.
Subtask spans, bounded as UpdateEpisodes bounds Episode.subtasks.
One subtask span (QUA-1794).
object
Start, in seconds from the start of the recording.
End, in seconds.
The subtask’s one name (also one of the episode’s tags).
Proposed, accepted or rejected.
Who proposed it.
Reserved for re-splits: the split take’s pieces the drawing began on.
Always OPEN.
Who drew it first: a person, or an API key acting for none.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
Who last changed the drawing: a person, or an API key acting for none.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When it was first saved.
When it was last saved.
Changes with every save of the draft. Sent back on UpdateEpisodeDraft
and DeleteEpisodeDraft, and as UpdateEpisodesRequest.Edit’s
expected_draft_etag.
Responses
Section titled “ Responses ”OK
An edit of a take drawn and not yet in a version (docs/design/episode-drafts-and-reediting.md): one per take, read the same through every dataset that reads the take. It is never applied to the dataset: head keeps the take as recorded, and only a version made from a Publish preview holds the edit. Written by whoever holds the take’s edit lease (Episode.lease), or, while no other person holds one, by any caller with write access, a person or an API key. It stays when its author’s lease ends, for whoever edits the take next, and through a re-ingest of the take.
Served by qds-api.
object
Accounts/{account}/datasets/{dataset}/episodes/{episode}/draft
What a version published from it holds.
object
The take as pieces, in time order and not overlapping, within the recording; at most 512 kept. Stored end to end over the recording: what lies between the pieces sent is stored as dropped pieces.
A stretch of the take as drawn.
object
Start, in seconds from the start of the recording.
End, in seconds.
Whether the stretch is kept: one kept piece is a trim, two or more a split.
Tags the episode this piece becomes carries (a marker split’s labels), beside the take’s own. Kept only on a kept piece; at most 64, each non-empty, without surrounding whitespace, at most 1024 bytes.
Subtask spans, bounded as UpdateEpisodes bounds Episode.subtasks.
One subtask span (QUA-1794).
object
Start, in seconds from the start of the recording.
End, in seconds.
The subtask’s one name (also one of the episode’s tags).
Proposed, accepted or rejected.
Who proposed it.
The Episode.revision the drawing began on.
The editor as read when drawing began (the take’s trim and subtasks then), so a return can tell what moved under the drawing.
object
The take as pieces, in time order and not overlapping, within the recording; at most 512 kept. Stored end to end over the recording: what lies between the pieces sent is stored as dropped pieces.
A stretch of the take as drawn.
object
Start, in seconds from the start of the recording.
End, in seconds.
Whether the stretch is kept: one kept piece is a trim, two or more a split.
Tags the episode this piece becomes carries (a marker split’s labels), beside the take’s own. Kept only on a kept piece; at most 64, each non-empty, without surrounding whitespace, at most 1024 bytes.
Subtask spans, bounded as UpdateEpisodes bounds Episode.subtasks.
One subtask span (QUA-1794).
object
Start, in seconds from the start of the recording.
End, in seconds.
The subtask’s one name (also one of the episode’s tags).
Proposed, accepted or rejected.
Who proposed it.
Reserved for re-splits: the split take’s pieces the drawing began on.
Always OPEN.
Who drew it first: a person, or an API key acting for none.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
Who last changed the drawing: a person, or an API key acting for none.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When it was first saved.
When it was last saved.
Changes with every save of the draft. Sent back on UpdateEpisodeDraft
and DeleteEpisodeDraft, and as UpdateEpisodesRequest.Edit’s
expected_draft_etag.
Example
{ "drawing": { "subtasks": [ { "review": "REVIEW_UNSPECIFIED", "origin": "ORIGIN_UNSPECIFIED" } ] }, "base": { "subtasks": [ { "review": "REVIEW_UNSPECIFIED", "origin": "ORIGIN_UNSPECIFIED" } ] }, "state": "STATE_UNSPECIFIED", "createActor": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } }, "updateActor": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } }}default
Section titled “default ”Default error response
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}