Skip to content

Episodes_UnsplitEpisodes

POST
/v1/accounts/{account}/datasets/{dataset}/episodes:unsplit
curl --request POST \
--url https://api.qualia.dev/v1/accounts/example/datasets/example/episodes:unsplit \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "parent": "example", "episodes": [ "example" ], "preparation": true, "validateOnly": true, "requestId": "example" }'

Restores takes that preparation split and published: the upload gets one new version that holds each take whole and none of its pieces. The versions that hold a piece keep it. A take whose pieces someone edited is left, with its reason, and the others go on. Each restored take’s cut becomes an open SplitProposal again. Splits a person published are never restored.

account
required
string

The account id.

dataset
required
string

The dataset id.

Media type application/json

Request for Episodes.UnsplitEpisodes.

object
parent
required

Accounts/{account}/datasets/{dataset}: must be the upload.

string
episodes

The takes to restore. Not with preparation.

Array<string>
preparation

Restore every take whose split preparation published and head still holds. A take restored already is not listed. Not with episodes.

boolean
validateOnly

Report what would be restored and left, without publishing.

boolean
requestId

Optional UUID identifying this logical edit. Reusing it with the same caller and request returns the original result; different input conflicts. When absent, each call starts a new logical edit.

string
Example generated
{
"parent": "example",
"episodes": [
"example"
],
"preparation": true,
"validateOnly": true,
"requestId": "example"
}

OK

Media type application/json

Response for Episodes.UnsplitEpisodes.

object
restored

The takes restored, or with validate_only, the ones that would be.

Array<object>

One take restored.

object
episode

Accounts/{account}/datasets/{dataset}/episodes/{episode}: the take, whole on head again.

string
pieces

Its pieces, now off head. The versions that hold them keep them.

Array<string>
proposal

The split as an open proposal again: one Accept draws it back. Unset for a split of one piece: a proposal keeps two windows or more.

object
episode

Accounts/{account}/datasets/{dataset}/episodes/{episode}: the take.

string
run

The run that proposed it: a preparation run (Preparation.run_id) or a check run.

string
windows

The windows kept, one or more, in time order, in seconds from the take’s start. Two or more are pieces; one is a trim. What lies between them, before the first and after the last is dropped.

Array<object>

The trim window, in seconds from the start of the recording.

object
startSeconds

First second kept.

number format: double
endSeconds

Last second kept.

number format: double
state

Where it stands.

string format: enum
Allowed values: STATE_UNSPECIFIED PROPOSED ACCEPTED REJECTED SUPERSEDED APPLIED
decidedBy

Who made the last decision: a person, or an API key acting for none. A person’s own API key decides as that person, with the key in api_key. Unset while PROPOSED, and for APPLIED.

object
kind

What kind of actor it is.

string format: enum
Allowed values: KIND_UNSPECIFIED PERSON VALIDATION RULE MODEL OPERATOR SYSTEM
user

The person’s user id when kind is PERSON; empty otherwise.

string
displayName

The person’s display name at the time, for rendering without a lookup.

string
agent

The rule code, or for a MODEL the Qualia model tier (e.g. “qualia-vlm”; “qualia” for any other model), when not a person.

string
run

The run a model or rule finding came from, when it has one.

string
apiKey

The API key’s id when a person acted through one; empty for a session. Never the key itself.

string
attribution

Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.

object
authentication

How the principal authenticated.

string format: enum
Allowed values: AUTHENTICATION_UNSPECIFIED SESSION API_KEY SERVICE
initiator

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.

string
initiatorDisplayName

The initiator’s display name at the time, never their email.

string
credentialCreator

The user id of the key’s creator at the time. Not who used the key.

string
credentialOwner

Who owned the key at the time.

string format: enum
Allowed values: CREDENTIAL_OWNER_UNSPECIFIED PERSON SPACE
credentialOwnerSpace

The owning space’s id (a workspace or the organization) when credential_owner is SPACE.

string
decideTime

When.

string format: date-time
undoRefusal

For APPLIED: empty when UnsplitEpisodes can restore the take, else why it cannot (“piece 18.2: relabelled by Fabian”). Empty in every other state.

string
cuts

Each cut between two windows, in time order: one fewer than windows, so none for a trim.

Array<object>

Why preparation would cut the take at one place: the model’s answer when it checked the frames there.

object
startSeconds

Where the window after the cut starts, in seconds from the take’s start.

number format: double
confidence

How sure the model was.

string format: enum
Allowed values: CONFIDENCE_UNSPECIFIED LOW MEDIUM HIGH
reason

The model’s reason, in its own words (“the person resets the cloth and starts folding again”). Empty when not recorded.

string
startReason

Why the first window starts after the take does (a trimmed start), in its proposer’s words (“Tracking lost 0.00-0.50 s (0.50 s)”). Empty when nothing before it is dropped, or the proposer said nothing.

string
endReason

Why the last window ends before the take does (a trimmed end), in its proposer’s words. Empty when nothing after it is dropped, or the proposer said nothing.

string
checks

The checks whose part the proposal carries, by check id (“heuristic.nan”), whichever run wrote it; none for preparation’s own cut. An issue of the free NaN check opens a proposal that carries “heuristic.nan”.

Array<string>
note

What else happened to the take, in one sentence; empty when nothing did. When a piece had a Task link the take does not get, it says why: “restored without a Task link: its pieces were linked to different tasks”, ”…: only some of its pieces were linked to a task”, or ”…: not every piece was linked to its task by the model”.

string
left

The takes left as they were, each with why.

Array<object>

A take a call left as it was, and why. The call goes on with the others.

object
episode

Accounts/{account}/datasets/{dataset}/episodes/{episode}

string
reason

Why, in one sentence (“the take has a saved drawing; open it in the studio”).

string
version

Accounts/{account}/datasets/{dataset}/versions/{version}: the upload’s new head version, which holds the restored takes. Empty with validate_only, and when nothing was restored.

string
Example
{
"restored": [
{
"proposal": {
"state": "STATE_UNSPECIFIED",
"decidedBy": {
"kind": "KIND_UNSPECIFIED",
"attribution": {
"authentication": "AUTHENTICATION_UNSPECIFIED",
"credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED"
}
},
"cuts": [
{
"confidence": "CONFIDENCE_UNSPECIFIED"
}
]
}
}
]
}

Default error response

Media type application/json
One of:
API error

A refusal from the API itself.

object
code
required

The gRPC code name in upper case, e.g. NOT_FOUND.

string
message
required
string
retryable
required

Whether the same call may succeed if retried.

boolean
details
required

Empty, except when a dataset copy or move is refused: then one google.rpc.ErrorInfo with the refusal’s reason code, its domain and, in metadata, the datasets it names.

Array<object>
object
Example generated
{
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
]
}