Episodes_SplitEpisodes
const url = 'https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes:split';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"parent":"example","cutPlan":{"episodes":[{"episode":"example","cutSeconds":[1],"keepWindows":[{"startSeconds":1,"endSeconds":1}]}]},"markerCuts":{"selection":{"names":{"names":["example"]},"filter":"example"},"labels":["example"],"startFirstMarker":true,"endLastMarker":true,"startLabels":["example"],"endLabels":["example"]},"validateOnly":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes:split \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "parent": "example", "cutPlan": { "episodes": [ { "episode": "example", "cutSeconds": [ 1 ], "keepWindows": [ { "startSeconds": 1, "endSeconds": 1 } ] } ] }, "markerCuts": { "selection": { "names": { "names": [ "example" ] }, "filter": "example" }, "labels": [ "example" ], "startFirstMarker": true, "endLastMarker": true, "startLabels": [ "example" ], "endLabels": [ "example" ] }, "validateOnly": true }'Splits episodes at given cuts, around kept windows or at their markers
(QUA-2252, QUA-2254): each split is drawn on the episode’s draft
(EpisodeDraft), its pieces the windows kept, each tagged with the labels
of the markers that closed it, inside the window the draft keeps (else
the episode’s trim). No episode is made until a version is published
from a Publish preview. An episode whose draft draws a split already is
refused (marker cuts skip it); one another person is editing is left as
it is and reported in locked.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The account id.
The dataset id.
Request Body required
Section titled “Request Body required ”Request for Episodes.SplitEpisodes.
object
Accounts/{account}/datasets/{dataset}: must be the upload.
Explicit cuts.
object
One entry per episode, at most 500.
Where to cut one episode.
object
Accounts/{account}/datasets/{dataset}/episodes/{episode}
Cut points, seconds from the start of the recording. An episode is cut inside the one stretch its draft keeps, else inside its trim: its pieces keep only those frames, and a cut outside them places nothing (QUA-3614).
The windows to keep instead (QUA-3539), seconds from the start of the recording, in time order and not overlapping: each becomes one child, and what lies outside every window is in no child. Two windows that touch are two children. A window may keep frames the episode’s trim cut (kept_trimmed_frame_count says how many). Not with cut_seconds.
The trim window, in seconds from the start of the recording.
object
First second kept.
Last second kept.
Marker cuts.
object
Episodes to cut.
object
Episode names under the request’s parent.
object
Accounts/{account}/datasets/{dataset}/episodes/{episode}, at most 10000.
A ListEpisodes filter over the parent (e.g. what the filter bar leaves).
Marker labels to cut at; empty means every marker (none when start_labels or end_labels is set).
Drop what comes before the first marker.
Drop what comes after the last marker.
Start each episode at its first marker among these labels instead,
dropping the lead-in. Not with start_first_marker. Without labels,
nothing is cut: each episode becomes one child, its narrowed window
(QUA-3048).
End each episode at its last marker among these labels instead,
dropping the run-out. Not with end_last_marker. Without labels, as
start_labels.
Report the children without writing them.
Example generated
{ "parent": "example", "cutPlan": { "episodes": [ { "episode": "example", "cutSeconds": [ 1 ], "keepWindows": [ { "startSeconds": 1, "endSeconds": 1 } ] } ] }, "markerCuts": { "selection": { "names": { "names": [ "example" ] }, "filter": "example" }, "labels": [ "example" ], "startFirstMarker": true, "endLastMarker": true, "startLabels": [ "example" ], "endLabels": [ "example" ] }, "validateOnly": true}Responses
Section titled “ Responses ”OK
Response for Episodes.SplitEpisodes.
object
One per parent that was cut.
One parent and what it became.
object
The parent episode.
Empty: the split is drawn on the parent’s draft (draft), and its
pieces are made only when a version is published from it. With
validate_only, a name for each piece, which never exists.
Frames of the recording before the first child that no child keeps (the dropped lead-in, with what the episode’s trim cut there).
Frames of the recording after the last child that no child keeps (the dropped run-out, with what the episode’s trim cut there).
Frames between children that no child keeps (keep_windows apart). (— api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: named beside dropped_lead_frame_count and dropped_tail_frame_count, the stretch between children. —)
Frames the children keep that the episode’s trim had cut: keep_windows may reach past the trim, cut_seconds and marker cuts never do (QUA-3614). 0 for an untrimmed episode.
The parent’s draft, drawn with the split: the pieces it keeps, each an episode once a version is published from it. Unset with validate_only.
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.
How many pieces the split keeps.
Parents left uncut because another person holds their edit lease.
The first 100 of them, with their holders.
An episode a write left alone, or refused, because another person holds its edit lease (Episodes.AcquireEpisodeLease). Bulk responses list at most 100 of these beside a count of all of them.
object
Accounts/{account}/datasets/{dataset}/episodes/{episode}, in the scope the write was made in.
The holder’s display name; empty when they have none. (— api-linter: core::0122::name-suffix=disabled aip.dev/not-precedent: a person’s display name, as Episode.Lease calls it. —)
Marker splits left unchanged for a reason other than an edit lease. Includes refusals found while planning and while saving the drawing.
A marker split that could not be drawn. Other selected takes proceed.
object
The parent episode left unchanged.
Why no split was drawn, including an already drawn split or no marker.
Example
{ "splits": [ { "draft": { "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" } ]}