# Episodes_ListEpisodeRevisions

`GET /v1/accounts/{account}/datasets/{dataset}/episodes/{episode}/revisions`

An episode's edits, newest first, then the recording as revision 0; an
episode nobody edited lists nothing. The history is the take's: the same
through any dataset that holds it.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header

## Parameters

- `account` (path, string, required): The account id.
- `dataset` (path, string, required): The dataset id.
- `episode` (path, string, required): The episode id.
- `pageSize` (query, integer (int32)): At most this many; 0 means 50, the maximum is 500.
- `pageToken` (query, string): From a previous response's next_page_token.
- `revisions` (query, array of integer (int32)): Optional exact revisions (at most two, nonnegative). Cannot be combined
  with page_token. Missing revisions are omitted, never replaced by head.

## Responses

- `200` OK: `application/json` `qualia.v1.ListEpisodeRevisionsResponse`
- `default` Default error response: `application/json` `google.rpc.Status`

## Schemas

```yaml
qualia.v1.ListEpisodeRevisionsResponse:
  type: object
  properties:
    episodeRevisions:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.EpisodeRevision"
      description: One page of revisions, newest first.
    nextPageToken:
      type: string
      description: Empty on the last page.
  description: Response for Episodes.ListEpisodeRevisions.
qualia.v1.EpisodeRevision:
  type: object
  properties:
    name:
      type: string
      description: accounts/{account}/datasets/{dataset}/episodes/{episode}/revisions/{revision}
    revision:
      readOnly: true
      type: integer
      description: |-
        1, 2, 3, ... in edit order; Episode.revision is the newest. 0 is the
        recording.
      format: int32
    note:
      readOnly: true
      type: string
      description: What the edit was for, in the editor's words; may be empty.
    author:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Actor"
      description: Who edited; the system for the recording.
    createTime:
      readOnly: true
      type: string
      description: When; for the recording, when it was ingested.
      format: date-time
    task:
      readOnly: true
      type: string
      description: Task label after the edit.
    instruction:
      readOnly: true
      type: string
      description: Language instruction after the edit.
    method:
      readOnly: true
      type: string
      description: Legacy single-method projection after the edit.
    methods:
      readOnly: true
      type: array
      items:
        type: string
      description: Collection-method tags after the edit.
    scene:
      readOnly: true
      type: string
      description: Scene label after the edit.
    tags:
      readOnly: true
      type: array
      items:
        type: string
      description: Free tags after the edit.
    outcome:
      readOnly: true
      enum:
        - OUTCOME_UNSPECIFIED
        - SUCCESS
        - PARTIAL
        - FAILURE
      type: string
      description: Outcome after the edit.
      format: enum
    trim:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Episode_Trim"
      description: |-
        Trim window after the edit; unset means untrimmed. An open end is 0
        (start) or the recording's end (end) as Episode.trim reads it.
    subtasks:
      readOnly: true
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Episode_Subtask"
      description: Subtask spans after the edit.
  description: |-
    One edit of a take's content, kept for good: what the history
    in the episode studio lists. A revision holds the whole state after the
    edit, not the change: a field the edit did not set holds the recording's
    value, as Episode reads it. What changed is its difference from the
    revision before it. Revision 0 is the recording itself, before any edit,
    so the first edit's changes read against it. Rulings (keep, reject) are
    not revisions.

    Served by qds-api.
qualia.v1.Actor:
  type: object
  properties:
    kind:
      readOnly: true
      enum:
        - KIND_UNSPECIFIED
        - PERSON
        - VALIDATION
        - RULE
        - MODEL
        - OPERATOR
        - SYSTEM
      type: string
      description: What kind of actor it is.
      format: enum
    user:
      readOnly: true
      type: string
      description: The person's user id when `kind` is PERSON; empty otherwise.
    displayName:
      readOnly: true
      type: string
      description: The person's display name at the time, for rendering without a lookup.
    agent:
      readOnly: true
      type: string
      description: |-
        The rule code, or for a MODEL the Qualia model tier (e.g. "qualia-vlm";
        "qualia" for any other model), when not a person.
    run:
      readOnly: true
      type: string
      description: The run a model or rule finding came from, when it has one.
    apiKey:
      readOnly: true
      type: string
      description: |-
        The API key's id when a person acted through one; empty for a session.
        Never the key itself.
    attribution:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Attribution"
      description: |-
        Signed identity evidence recorded with the change, kept apart from the
        principal above. Unset on older records and wherever none was signed.
  description: Who did something. Every decision, issue and reply names one.
qualia.v1.Attribution:
  type: object
  properties:
    authentication:
      readOnly: true
      enum:
        - AUTHENTICATION_UNSPECIFIED
        - SESSION
        - API_KEY
        - SERVICE
      type: string
      description: How the principal authenticated.
      format: enum
    initiator:
      readOnly: true
      type: string
      description: |-
        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.
    initiatorDisplayName:
      readOnly: true
      type: string
      description: The initiator's display name at the time, never their email.
    credentialCreator:
      readOnly: true
      type: string
      description: The user id of the key's creator at the time. Not who used the key.
    credentialOwner:
      readOnly: true
      enum:
        - CREDENTIAL_OWNER_UNSPECIFIED
        - PERSON
        - SPACE
      type: string
      description: Who owned the key at the time.
      format: enum
    credentialOwnerSpace:
      readOnly: true
      type: string
      description: |-
        The owning space's id (a workspace or the organization) when
        `credential_owner` is SPACE.
  description: |-
    How a change was authenticated and who verifiably started it.
    Only the trusted mesh signs it. It never authorizes anything, and a key's
    creator or owner is never the person who used the key.
qualia.v1.Episode_Trim:
  type: object
  properties:
    startSeconds:
      type: number
      description: First second kept.
      format: double
    endSeconds:
      type: number
      description: Last second kept.
      format: double
  description: The trim window, in seconds from the start of the recording.
qualia.v1.Episode_Subtask:
  type: object
  properties:
    startSeconds:
      type: number
      description: Start, in seconds from the start of the recording.
      format: double
    endSeconds:
      type: number
      description: End, in seconds.
      format: double
    label:
      type: string
      description: The subtask's one name (also one of the episode's tags).
    review:
      enum:
        - REVIEW_UNSPECIFIED
        - PROPOSED
        - ACCEPTED
        - REJECTED
      type: string
      description: Proposed, accepted or rejected.
      format: enum
    origin:
      enum:
        - ORIGIN_UNSPECIFIED
        - HUMAN
        - MODEL
        - HEURISTIC
      type: string
      description: Who proposed it.
      format: enum
  description: One subtask span.
google.rpc.Status:
  oneOf:
    - $ref: "#/components/schemas/ApiError"
    - $ref: "#/components/schemas/GatewayError"
  description: "The body of a failed call: one of the two shapes below."
ApiError:
  title: API error
  type: object
  required:
    - code
    - message
    - retryable
    - details
  properties:
    code:
      type: string
      description: The gRPC code name in upper case, e.g. `NOT_FOUND`.
    message:
      type: string
    retryable:
      type: boolean
      description: Whether the same call may succeed if retried.
    details:
      type: array
      items:
        type: object
      description: "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."
  description: A refusal from the API itself.
GatewayError:
  title: Gateway error
  type: object
  required:
    - detail
  properties:
    detail:
      type: string
      description: What went wrong.
  description: A refusal from the gateway before the call reaches the API, for example `401` bad or missing API key, `403` key lacks the scope or environment closed, `413` body too large.
```
