# Statuses_ListStatuses_Workspace

`GET /v1/accounts/{account}/workspaces/{workspace}/statuses`

Lists running work (QUEUED, RUNNING) and work that ended within
`recent`, most recently changed first. An organization's list holds
every workspace's work and the organization's own.

- 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.
- `workspace` (path, string, required): The workspace id.
- `pageSize` (query, integer (int32)): At most this many; 0 means 100, the maximum is 500.
- `pageToken` (query, string): From a previous response's next_page_token, with the same parent,
  filter and recent. Pages follow the order at each read: work that
  changed in between may show on two pages or on neither, so a live view
  follows the events stream rather than re-paging.
- `filter` (query, string): AIP-160 filter. Fields: `state`, `kind` (enum names) and `service`,
  compared with `=` or `!=`, e.g. `state = QUEUED OR state = RUNNING` for
  what runs now, or `service = "pipeline" AND state != FAILED`. OR binds
  tighter than AND.
- `recent` (query, string): How far back ended work goes: FINISHED, FAILED and CANCELLED work that
  ended longer ago is left out. Running work is always in. Unset means 24
  hours; at most 90 days.

  ```yaml
  pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
  type: string
  description: Represents a a duration between -315,576,000,000s and 315,576,000,000s (around 10000 years). Precision is in nanoseconds. 1 nanosecond is represented as 0.000000001s
  ```

## Responses

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

## Schemas

```yaml
qualia.v1.ListStatusesResponse:
  type: object
  properties:
    statuses:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Status"
      description: One page, most recently changed first.
    nextPageToken:
      type: string
      description: Empty on the last page.
  description: Response for Statuses.ListStatuses.
qualia.v1.Status:
  type: object
  properties:
    operation:
      readOnly: true
      type: string
      description: |-
        The operation's id: the owning row's UUID in canonical form, e.g.
        "3f2b8c1e-7d4a-4e9b-9c2f-0a6e5d1b8f47", never a path with a slash.
        Event.operation on each of its events.
    service:
      readOnly: true
      type: string
      description: |-
        The service that runs it, and that a cancel goes to: "qds", "training",
        "pipeline", ...
    kind:
      readOnly: true
      enum:
        - KIND_UNSPECIFIED
        - INGEST
        - IMPORT
        - HEALTH
        - CURATION
        - EXPORT
        - RESYNC
        - SPLIT
        - CHECKS
        - JUDGE
        - REACH
        - TRAINING_JOB
        - PIPELINE_RUN
        - PIPELINE_OP
        - CURATION_APPLY
        - EPISODE_REVISION
      type: string
      description: What kind of work it is.
      format: enum
    target:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Subject"
      description: What it works on, e.g. a dataset.
    state:
      readOnly: true
      enum:
        - STATE_UNSPECIFIED
        - QUEUED
        - RUNNING
        - FINISHED
        - FAILED
        - CANCELLED
      type: string
      description: Where it is.
      format: enum
    actor:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Actor"
      description: Who started it.
    progress:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Status_Progress"
      description: |-
        How far it has got; unset when the service posted nothing or the work
        has ended.
    createTime:
      readOnly: true
      type: string
      description: When it was queued (its first event).
      format: date-time
    updateTime:
      readOnly: true
      type: string
      description: When its state or progress last changed.
      format: date-time
    response:
      type: object
      description: "FINISHED: what the work produced, as protojson, when it has a result."
    error:
      type: string
      description: "FAILED: one plain line on why."
    name:
      type: string
      description: |-
        accounts/{account}/workspaces/{workspace}/statuses/{operation}, or
        accounts/{account}/statuses/{operation} for work of the organization
        itself. The last segment is `operation`.
        accounts/{account}/statuses/{operation} reads any of them.
    origin:
      readOnly: true
      enum:
        - ORIGIN_UNSPECIFIED
        - WORKSPACE
        - ORGANIZATION
      type: string
      description: Whether the work runs in a workspace or in the organization itself.
      format: enum
    cancellable:
      readOnly: true
      type: boolean
      description: |-
        Whether this service and kind support CancelStatus. Authorization and
        the current state are checked again when cancellation is requested.
  description: |-
    Running work, and how it ended: an ingest, a check run, a training job, a
    pipeline run.

    This is not a `google.rpc.Status` (an error code and message). It is the
    state of one operation, rebuilt from its latest OPERATION_* event in the
    record (QUEUED, STARTED, FINISHED, FAILED, CANCELLED), joined with the
    progress its service last posted. Progress is never an event and never sets
    the state, so a late progress write cannot undo a final state.

    Served by events. Work is named under its workspace; work of
    the organization itself is named under the organization (`origin`
    ORGANIZATION). Every status can also be read by its organization path.
qualia.v1.Subject:
  type: object
  properties:
    type:
      readOnly: true
      type: string
      description: What kind of thing, e.g. "dataset", "episode", "robot", "workspace".
    name:
      readOnly: true
      type: string
      description: Its resource name or id, e.g. "accounts/a/datasets/d".
    label:
      readOnly: true
      type: string
      description: What a person called it at the time, e.g. "Pick and place, v2".
  description: |-
    A thing an event or a status points at. Labels are captured when the event
    is written, so a renamed or deleted thing still reads as it was.
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.Status_Progress:
  type: object
  properties:
    phase:
      readOnly: true
      type: string
      description: The current phase, e.g. "derive".
    done:
      readOnly: true
      type: string
      description: Units done in this phase.
    total:
      readOnly: true
      type: string
      description: Units in this phase; 0 when unknown.
    message:
      readOnly: true
      type: string
      description: |-
        The work's own line about where it is, e.g. "epoch 3"; empty when its
        service sent none.
  description: |-
    How far the work has got, as its service last posted. Cleared once the
    work ends.
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.
```
