# Tasks_GetTaskRevision

`GET /v1/accounts/{account}/tasks/{task}/revisions/{revision}`

Gets one revision.

- 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.
- `task` (path, string, required): The task id.
- `revision` (path, string, required): The revision id.

## Responses

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

## Schemas

```yaml
qualia.v1.TaskRevision:
  type: object
  properties:
    name:
      type: string
      description: accounts/{account}/tasks/{task}/revisions/{revision}
    revision:
      readOnly: true
      type: integer
      description: 1, 2, 3, ... in publishing order.
      format: int32
    displayName:
      readOnly: true
      type: string
      description: The task's display name when it was published.
    spec:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.TaskSpec"
      description: The specification, exactly as published.
    schemaVersion:
      readOnly: true
      type: integer
      description: |-
        The version of the TaskSpec schema it was written with. Readers reject a
        version they do not know rather than guess.
      format: int32
    contentHash:
      readOnly: true
      type: string
      description: |-
        sha256 of the spec's canonical JSON: two revisions with one hash say the
        same thing, and a run can pin the content it read.
    note:
      readOnly: true
      type: string
      description: What changed, in the publisher's words.
    publisher:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Actor"
      description: Who published it.
    createTime:
      readOnly: true
      type: string
      description: When it was published.
      format: date-time
  description: |-
    A published, immutable task specification. Episodes judged and evals
    scored against a task cite one of these, so results stay comparable: a
    revision never changes once written.
qualia.v1.TaskSpec:
  type: object
  properties:
    description:
      type: string
      description: What the robot should do, in ordinary language. Required to publish.
    scene:
      type: string
      description: |-
        The scene the task runs in: the workspace, the objects that matter, how
        things start and what varies between episodes.
    steps:
      type: string
      description: |-
        The steps of the task in order, one per line, e.g. "pick a box from the
        tray".
    success:
      type: string
      description: |-
        How success shows: what has to be true, or seen happening, for an
        episode to succeed. Required to publish.
    failure:
      type: string
      description: |-
        How it fails: the ways the task goes wrong, and what looks like a
        failure but is fine.
    procedure:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Procedure"
      description: |-
        The task as a state machine of steps and transitions, beside the prose.
        Optional; when it has steps, publishing checks that it is well formed.
  description: |-
    What a task asks for, as five pieces of prose. Each is plain multi-line
    text of at most 20000 characters. Every field is optional while drafting;
    publishing needs `description` and `success`. An optional `procedure` lays
    the task out as a state machine beside the prose.
qualia.v1.Procedure:
  type: object
  properties:
    steps:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Step"
      description: |-
        The steps. Step ids are the stable names judgments, subtask labels and
        progress report against. At most 64.
    transitions:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Transition"
      description: |-
        How steps follow each other, each from one step to another; nothing is
        implied. A failure outcome that can happen at several steps has a
        transition from each. At most 256.
    procedureSet:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.PersonSet"
      description: |-
        The signed-in person whose edit wrote these steps and transitions.
        Written only by the server, on any UpdateTask from such a person that
        changes them. An API key's change or a new proposal from preparation
        clears it. Unset on a draft, the step-order check reads uncertain instead
        of failing a take. It is left out of `content_hash`.
  description: |-
    The task as a state machine: where an attempt starts, the actions it
    takes and the outcomes it ends in. Optional, and a layer over the prose:
    the prose says what the task is, the procedure gives checks, subtask labels
    and progress stable names to report against. A procedure that has steps is
    checked when the task is published: one start step, at least one success
    outcome, every step reachable from the start, no step that leads nowhere,
    nothing after an outcome, no loops, and no task that contains itself.
qualia.v1.Step:
  required:
    - id
  type: object
  properties:
    id:
      type: string
      description: |-
        Stable within the procedure, e.g. "place_box": given by the editor when the
        step is made and not changed after. 1 to 64 lowercase letters, digits or
        '_', starting with a letter. Unique within the procedure.
    kind:
      enum:
        - KIND_UNSPECIFIED
        - START
        - ACTION
        - SUCCESS
        - FAILURE
        - RECOVERY
      type: string
      description: What the step is.
      format: enum
    description:
      type: string
      description: |-
        The step in one line, as it observably holds: what an action or
        recovery gets done (e.g. "place the box upright on the shelf"), what an
        outcome looks like. At most 200 characters. Needed to publish, except on
        the start and on a step that stands for a task (`task`), which is named
        by the task.
    task:
      type: string
      description: |-
        An action that is a whole other task of the same account,
        accounts/{account}/tasks/{task}. In a draft it means that task's newest
        published revision; publishing pins it, so a revision's steps name
        accounts/{account}/tasks/{task}/revisions/{revision}. A task never
        contains itself, directly or through others. Such a step takes its name
        from the task and leaves `description` empty.
    minCount:
      type: integer
      description: |-
        The fewest times an action (or recovery) happens in a successful
        attempt: 0 or more; 0 makes it optional, e.g. a step only some attempts
        need. With both counts unset the step is not counted: checks report how
        often it happened and never flag it. Checks enforce a count only when
        `count_set` names the person who set it.
      format: int32
    maxCount:
      type: integer
      description: |-
        The most times an action (or recovery) happens in a successful attempt,
        e.g. 4 box placements: 1 or more, and at least `min_count`. Unset is no
        limit. Exactly N is both N; up to N is `max_count` N alone.
      format: int32
    triggers:
      type: array
      items:
        type: string
      description: |-
        What observably sets a recovery off ("When"), e.g. "the box slips in the
        gripper". Only a recovery has triggers, and it needs one to publish. At
        most 16, each 1 to 500 characters.
    stateChecks:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.StateCheck"
      description: |-
        Conditions that observably hold at this step. At most 16; each needs
        text to publish and may also name a numeric condition. Not on START.
    bounds:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Bound"
      description: Metric limits for this step. At most 8. Not on START.
    countSet:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.PersonSet"
      description: |-
        The person who set `min_count` and `max_count` to their current values.
        Written only by the server, from UpdateTaskRequest.person_set; cleared
        when either count, the kind or `task` changes without it. Unset means the
        counts are not enforced, whatever they are.
  description: |-
    A state of the task: its start, an action, a recovery, or an outcome it
    ends in.
qualia.v1.StateCheck:
  required:
    - text
  type: object
  properties:
    text:
      type: string
      description: What must hold, in 1 to 500 characters. Needed to publish.
    numeric:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.NumericCondition"
      description: |-
        A numeric form of the condition, when it can be measured. Only a person
        writes one: it publishes only with `numeric_set`.
    numericSet:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.PersonSet"
      description: |-
        The person who set `numeric` to its current value. Written only by the
        server, from UpdateTaskRequest.person_set. It follows the numeric form
        within its step and is cleared when that form changes without it.
  description: An observable condition at a procedure step, optionally expressed as a number.
qualia.v1.NumericCondition:
  required:
    - metric
    - op
    - value
  type: object
  properties:
    metric:
      type: string
      description: |-
        The metric name: 1 to 64 lowercase letters, digits, '_' or '.',
        starting with a letter.
    op:
      type: string
      description: "The comparison: lt, le, gt, ge, eq or between."
    value:
      type: number
      description: The comparison value, or the lower value for between.
      format: double
    valueHigh:
      type: number
      description: The upper value, greater than value. Set if and only if op is between.
      format: double
  description: A comparison against a measured metric.
qualia.v1.PersonSet:
  type: object
  properties:
    actor:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Actor"
      description: |-
        The person, always kind PERSON, with `user` and `display_name` as at
        the time.
    setTime:
      readOnly: true
      type: string
      description: When they set it.
      format: date-time
    digest:
      readOnly: true
      type: string
      description: |-
        Lowercase hex sha256 of the value. For counts:
        "count:<min_count>:<max_count>", each empty when unset. For a numeric
        condition: "numeric:<metric>:<op>:<value>:<value_high>", numbers as
        Python repr(float), value_high empty when unset. For a procedure:
        "procedure:<proto JSON>", keys sorted, without any stamp.
  description: |-
    A person's confirmation of one value: who, when, and a digest of the value
    confirmed. Written only by the server. It holds while the value's digest
    still matches.
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.Bound:
  required:
    - metric
  type: object
  properties:
    metric:
      type: string
      description: |-
        The metric name: 1 to 64 lowercase letters, digits, '_' or '.',
        starting with a letter.
    min:
      type: number
      description: The lower limit. At least one of min and max is needed to publish.
      format: double
    max:
      type: number
      description: The upper limit, at least min when both are set.
      format: double
  description: Inclusive limits for a measured metric at a procedure step.
qualia.v1.Transition:
  required:
    - source
    - target
  type: object
  properties:
    source:
      type: string
      description: The step it leaves, by id.
    target:
      type: string
      description: The step it enters, by id.
  description: A move from one step to another.
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.
```
