# Mixtures_BumpSource

`POST /v1/accounts/{account}/datasets/{dataset}/sources/{source}:bump`

Moves a pinned source to the newest stable tag of its dataset.
FAILED_PRECONDITION when it is not pinned or already newest. Emits
SOURCE_FOLLOW_CHANGED with bump = true.

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

## Request body

Required: `application/json` `qualia.v1.BumpSourceRequest`

## Responses

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

## Schemas

```yaml
qualia.v1.BumpSourceRequest:
  required:
    - name
  type: object
  properties:
    name:
      type: string
      description: accounts/{account}/datasets/{dataset}/sources/{source}
  description: Request for Mixtures.BumpSource.
qualia.v1.Source:
  type: object
  properties:
    name:
      type: string
      description: accounts/{account}/datasets/{dataset}/sources/{source}
    dataset:
      type: string
      description: |-
        accounts/{account}/datasets/{dataset}: an upload, a mixture or a
        merged dataset by name. Not an upload a merge took: name its
        merged dataset; a pin of one of its own tags, left from before, stays.
    label:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Source_LabelMatch"
      description: |-
        Every upload and merged dataset with this label value, present and
        future: a merged dataset by its own labels (a method by its own method
        tags, the union of its uploads', and then all of it), and no upload a
        merge took.
    linkedTask:
      type: string
      description: |-
        accounts/{account}/tasks/{task}: every episode linked to this task,
        present and future: its own Episode.linked_task, else its
        upload's or merged dataset's (Dataset.linked_task). An upload linked
        to another task brings in only its episodes linked to this one; no upload a merge took. A task of the
        mixture's account; NOT_FOUND otherwise. Deleting the task is not
        refused: the source stays, reads nothing and says so in `state`
        (TASK_DELETED).
    follow:
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Follow"
      description: |-
        How it is followed; unset means stable. A pin names a tag of `dataset`;
        a label or task source can only follow a channel.
    resolutions:
      readOnly: true
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Source_Resolution"
      description: |-
        What it resolves to now, one row per dataset (one for a dataset source,
        every matching upload and merged dataset for a label source).
    episodeCount:
      readOnly: true
      type: string
      description: Episodes it brings into head, after this mixture's rejects.
    inheritedRejectCount:
      readOnly: true
      type: string
      description: |-
        Mixture source only: episodes the source mixture had rejected itself,
        inherited unseen.
    update:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Source_Update"
      description: "Pinned source only: set when a newer stable tag exists."
    creator:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Actor"
      description: Who added it.
    createTime:
      readOnly: true
      type: string
      description: When it was added.
      format: date-time
    updateTime:
      readOnly: true
      type: string
      description: When its follow last changed.
      format: date-time
    etag:
      type: string
      description: Sent back on UpdateSource.
    position:
      type: integer
      description: |-
        Its place in the sources panel, from 0; the first source that brings an
        episode in is the one it counts under. A new source goes last; setting it
        moves the others along.
      format: int32
    state:
      readOnly: true
      enum:
        - STATE_UNSPECIFIED
        - ACTIVE
        - TASK_DELETED
      type: string
      description: |-
        Whether it can still read what it names; TASK_DELETED once its
        `linked_task` is gone.
      format: enum
  description: |-
    One thing a mixture reads: an upload or another mixture by name,
    or every upload carrying one label value, now and later. Each is followed
    on a channel or pinned to a tag. An upload or label source arrives raw
    (what the upload kept); a mixture source arrives curated (what it yields,
    its own rejects already out, and inherited). A mixture cannot read itself,
    however far round. There are no weights.

    Served by qds-api. Only a MIXTURE dataset has sources.
qualia.v1.Source_LabelMatch:
  required:
    - field
    - value
  type: object
  properties:
    field:
      enum:
        - FIELD_UNSPECIFIED
        - TASK
        - ROBOT
        - OPERATOR
        - METHOD
        - SCENE
      type: string
      description: The label.
      format: enum
    value:
      type: string
      description: The value it must equal, exactly.
  description: |-
    Every upload of the same account (kind UPLOAD only, never a mixture)
    whose label equals a value.
qualia.v1.Follow:
  type: object
  properties:
    channel:
      enum:
        - CHANNEL_UNSPECIFIED
        - STABLE
        - HEAD
      type: string
      description: Move with a channel.
      format: enum
    pin:
      type: string
      description: Stay on this version tag of the source dataset, e.g. "1.0".
  description: |-
    How a mixture source is read: on a channel that moves by itself, or pinned
    to one version tag that never moves.
qualia.v1.Source_Resolution:
  type: object
  properties:
    dataset:
      readOnly: true
      type: string
      description: accounts/{account}/datasets/{dataset}
    kind:
      readOnly: true
      enum:
        - KIND_UNSPECIFIED
        - UPLOAD
        - MIXTURE
        - MERGED
      type: string
      description: Upload, merged dataset or mixture.
      format: enum
    version:
      readOnly: true
      type: string
      description: The tag it is read at; empty at head.
    digest:
      readOnly: true
      type: string
      description: The digest it is read at.
    episodeCount:
      readOnly: true
      type: string
      description: Episodes it brings in, before this mixture's rejects.
    rejectedCount:
      readOnly: true
      type: string
      description: Episodes this mixture rejected among them.
    empty:
      readOnly: true
      type: boolean
      description: |-
        Nothing to read: the followed channel has no tag yet (stable on a
        dataset still in review).
    reviewedCount:
      readOnly: true
      type: string
      description: |-
        Upload or merged dataset (over the uploads it holds) only: ruled /
        total, for the sources panel's progress.
    totalCount:
      readOnly: true
      type: string
      description: |-
        Upload or merged dataset (over the uploads it holds) only: total
        episodes.
  description: One dataset the source resolved to, and where it is read.
qualia.v1.Source_Update:
  type: object
  properties:
    version:
      readOnly: true
      type: string
      description: The newer tag.
    addedCount:
      readOnly: true
      type: string
      description: Episodes it would add.
    removedCount:
      readOnly: true
      type: string
      description: Episodes it would remove.
    changedCount:
      readOnly: true
      type: string
      description: Episodes in both at another revision.
  description: A newer stable tag than the pin, and what moving would change.
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.
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.
```
