Skip to content

Episodes_GetEpisodeDraft

GET
/v1/accounts/{account}/datasets/{dataset}/episodes/{episode}/draft
curl --request GET \
--url https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes/example/draft \
--header 'X-API-Key: <X-API-Key>'

The take’s draft, through any dataset that reads the take. NOT_FOUND when it has none.

account
required
string

The account id.

dataset
required
string

The dataset id.

episode
required
string

The episode id.

OK

Media type application/json

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
name

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

string
drawing
required

What a version published from it holds.

object
pieces

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.

Array<object>

A stretch of the take as drawn.

object
startSeconds

Start, in seconds from the start of the recording.

number format: double
endSeconds

End, in seconds.

number format: double
keep

Whether the stretch is kept: one kept piece is a trim, two or more a split.

boolean
tags

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.

Array<string>
subtasks

Subtask spans, bounded as UpdateEpisodes bounds Episode.subtasks.

Array<object>

One subtask span (QUA-1794).

object
startSeconds

Start, in seconds from the start of the recording.

number format: double
endSeconds

End, in seconds.

number format: double
label

The subtask’s one name (also one of the episode’s tags).

string
review

Proposed, accepted or rejected.

string format: enum
Allowed values: REVIEW_UNSPECIFIED PROPOSED ACCEPTED REJECTED
origin

Who proposed it.

string format: enum
Allowed values: ORIGIN_UNSPECIFIED HUMAN MODEL HEURISTIC
baseRevision

The Episode.revision the drawing began on.

integer format: int32
base

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
pieces

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.

Array<object>

A stretch of the take as drawn.

object
startSeconds

Start, in seconds from the start of the recording.

number format: double
endSeconds

End, in seconds.

number format: double
keep

Whether the stretch is kept: one kept piece is a trim, two or more a split.

boolean
tags

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.

Array<string>
subtasks

Subtask spans, bounded as UpdateEpisodes bounds Episode.subtasks.

Array<object>

One subtask span (QUA-1794).

object
startSeconds

Start, in seconds from the start of the recording.

number format: double
endSeconds

End, in seconds.

number format: double
label

The subtask’s one name (also one of the episode’s tags).

string
review

Proposed, accepted or rejected.

string format: enum
Allowed values: REVIEW_UNSPECIFIED PROPOSED ACCEPTED REJECTED
origin

Who proposed it.

string format: enum
Allowed values: ORIGIN_UNSPECIFIED HUMAN MODEL HEURISTIC
baseSplit

Reserved for re-splits: the split take’s pieces the drawing began on.

string
state

Always OPEN.

string format: enum
Allowed values: STATE_UNSPECIFIED OPEN
createActor

Who drew it first: a person, or an API key acting for none.

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 the model id (e.g. “gemini-robotics-er”), 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
updateActor

Who last changed the drawing: a person, or an API key acting for none.

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 the model id (e.g. “gemini-robotics-er”), 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
createTime

When it was first saved.

string format: date-time
updateTime

When it was last saved.

string format: date-time
etag

Changes with every save of the draft. Sent back on UpdateEpisodeDraft and DeleteEpisodeDraft, and as UpdateEpisodesRequest.Edit’s expected_draft_etag.

string
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 error response

Media type application/json

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
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

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.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}