# Episodes_SignEpisodeVideos

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

Signs the episode's camera videos for playback: one short-lived URI per
camera, of the take's current content (the member of its upload's
published version), and where that content sits in the episode's
recording (window_start_seconds, window_end_seconds): after a trim the
files play the kept stretch alone. Read it again once a URI expires. A
take in no published version yet (a split child before its publish)
answers unpublished, with no videos; FAILED_PRECONDITION means the
published content cannot be signed (an object or storage missing).

- 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.
- `version` (query, string): Read as this version froze it: a tag, `stable`, `v0` or a
  digest prefix; empty or `head` reads the episode as it is now. As
  GetEpisodeRequest.version: the videos of the member that version holds.

## Responses

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

## Schemas

```yaml
qualia.v1.SignEpisodeVideosResponse:
  type: object
  properties:
    videos:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.SignEpisodeVideosResponse_Video"
      description: One per camera.
    unpublished:
      type: boolean
      description: |-
        True when the take is in no published version yet (a split child
        before its publish): it has no videos to sign.
    windowStartSeconds:
      type: number
      description: |-
        Where the videos' take starts in the episode's recording, in seconds of
        the recording (the clock its trim, subtasks and markers are in): a
        camera's start_seconds plays this second. 0 until a trim is applied,
        the trim's start once one is; a split's piece is a recording of its
        own, so 0. Unset with unpublished.
      format: double
    windowEndSeconds:
      type: number
      description: |-
        Where the take ends in the recording, in the same seconds: the
        recording's length, or the applied trim's end. A camera whose file
        ends sooner stops at its end_seconds. Unset with unpublished.
      format: double
  description: Response for Episodes.SignEpisodeVideos.
qualia.v1.SignEpisodeVideosResponse_Video:
  type: object
  properties:
    camera:
      type: string
      description: Camera key, e.g. "observation.images.top".
    uri:
      type: string
      description: Signed URI of the video file; it stops working at expire_time.
    startSeconds:
      type: number
      description: |-
        When the file holds more than this take: seconds into the file where
        the take starts. Unset when the take is the whole file.
      format: double
    endSeconds:
      type: number
      description: Seconds into the file where the take ends; unset with start_seconds.
      format: double
    expireTime:
      type: string
      description: When uri stops working.
      format: date-time
    recordingStartSeconds:
      type: number
      description: |-
        Seconds into the file where the take's whole recording starts, before
        any trim: start_seconds less what an applied trim cut from the start,
        so a client can show the footage a trim leaves out. Unset only when qds
        does not know it: the take has no window of this file on record.
      format: double
    recordingEndSeconds:
      type: number
      description: |-
        Seconds into the file where the whole recording ends; unset with
        recording_start_seconds.
      format: double
  description: One camera's video of the take.
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.
```
