# Events_GetEvent_Account

`GET /v1/accounts/{account}/events/{event}`

Gets one event.

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

## Responses

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

## Schemas

```yaml
qualia.v1.Event:
  type: object
  properties:
    id:
      readOnly: true
      type: string
      description: |-
        The event's id (a UUID). The relay copies a row under this id, so a
        replayed copy is a no-op.
    sequence:
      readOnly: true
      type: string
      description: |-
        Its place in the record: one global sequence, strictly increasing, in
        the order rows were copied. A service's own table numbers its rows
        separately (`source_sequence`).
    createTime:
      readOnly: true
      type: string
      description: When the change was committed.
      format: date-time
    organization:
      readOnly: true
      type: string
      description: The organization (account) id it happened in.
    workspace:
      readOnly: true
      type: string
      description: The workspace id it happened in; empty when `origin` is ORGANIZATION.
    service:
      readOnly: true
      type: string
      description: |-
        The service that committed it: "qds", "platform", "fleet", "training",
        "pipeline", "tasks" or "events". The prefix of `action`.
    actor:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Actor"
      description: |-
        Who did it. `api_key` is set when a person acted through a key; actor
        kind SYSTEM, RULE or MODEL for changes nobody made by hand.
    action:
      readOnly: true
      type: string
      description: |-
        What happened: `<service>.<TYPE>`, e.g. "qds.EPISODES_RULED". TYPE is a
        value name of the service's `Event.Type`.
    subject:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Subject"
      description: What it happened to, e.g. a dataset.
    parent:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.Subject"
      description: |-
        What the subject lives in, when that matters for filtering (a dataset's
        episode, a run's op); unset otherwise.
    related:
      readOnly: true
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.Subject"
      description: |-
        Other things the one change touched, e.g. the episodes a ruling covered,
        or the second entity of a two-entity action.
    summary:
      readOnly: true
      type: string
      description: One plain line, e.g. "rejected 12 episodes".
    payload:
      readOnly: true
      type: object
      description: |-
        The service's payload message for `action`, as protojson. Never holds a
        secret value.

        A Struct, not a Value: protojson renders a message as a JSON object, so
        a scalar or list here would be a writer bug the type now refuses. Not an
        Any: an Any needs the service's descriptors to read, and readers here
        never have them.
    payloadType:
      readOnly: true
      type: string
      description: |-
        The payload's full message name, e.g.
        "qds.workflow.v1.Event.EpisodesRuled"; empty when there is no payload.
    requestId:
      readOnly: true
      type: string
      description: The request that made the change, for joining with its logs and trace.
    undoable:
      readOnly: true
      type: boolean
      description: Whether the owning service can undo it.
    undoes:
      readOnly: true
      type: string
      description: The id of the event this one undid; empty unless it is an undo.
    operation:
      readOnly: true
      type: string
      description: |-
        The running work it belongs to, when it does (Status.operation). Every
        OPERATION_* event sets it.
    sourceSequence:
      readOnly: true
      type: string
      description: |-
        The source row's `sequence` in its service's events table (`service`
        names the table). Status orders an operation's transitions by it, never
        by `sequence`, which is only the order rows reached the record.
    name:
      type: string
      description: |-
        accounts/{account}/workspaces/{workspace}/events/{event} for an event of
        a workspace; accounts/{account}/events/{event} for one of the
        organization itself. `{event}` is `id`. Every event of an organization
        can also be read by its organization path.
    origin:
      readOnly: true
      enum:
        - ORIGIN_UNSPECIFIED
        - WORKSPACE
        - ORGANIZATION
      type: string
      description: Whether a workspace or the organization itself made the change.
      format: enum
    activityLink:
      readOnly: true
      allOf:
        - $ref: "#/components/schemas/qualia.v1.ActivityLink"
      description: Explicit request correlation. Absent on historical uncorrelated records.
  description: |-
    One thing that happened: a row of the audit trail.

    Every service writes its own events table (`qds.events`, `platform.events`,
    `fleet.events`, `training.events`, `pipeline.events`, `tasks.events`) in
    the transaction that makes the change, with these fields as columns.
    events-api copies the rows into one record and serves them; status (see
    Status) is read from the same rows. events-api writes `events.events` for
    what its retention job did (`events.v1.Event`).

    Each service types its actions in its own proto (`qds.workflow.v1.Event`,
    `platform.v1.Event`, `fleet.v1.Event`, `training.v1.Event`,
    `pipeline.v1.Event`, `tasks.v1.Event`, `events.v1.Event`): `action` is the
    service name and the type's value name, and `payload` is the matching
    payload message as protojson, rendered by the writer. Nothing downstream decodes a service
    proto.

    Served by events-api (Events), read from the record.
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.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.ActivityLink:
  type: object
  properties:
    root:
      readOnly: true
      type: string
      description: Canonical root event UUID, scoped to the event's account.
    role:
      readOnly: true
      enum:
        - ROLE_UNSPECIFIED
        - ROOT
        - EFFECT
      type: string
      description: Whether this event is the root or a derived effect.
      format: enum
  description: Proven request identity, independent of trace IDs and operation transitions.
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.
```
