> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rundesert.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a run's result

> What the automation produced. The shape of `result` is the automation's own: two automations answering different questions have no reason to agree on one, so nothing here reshapes it.

An unfinished or failed run answers **409**, not a null result. That keeps "there is nothing yet" apart from "this automation returned null", which is a real answer some of them give.



## OpenAPI

````yaml /openapi.json get /api/automations/{automationId}/runs/{runId}/result
openapi: 3.1.0
info:
  title: Workspace API
  version: 1.0.0
  description: >-
    Every workspace answers these endpoints. Nothing is registered and nothing
    is switched on: an automation that appears in your Automations tab is
    already readable here.


    The base URL is your workspace's own. Ask the agent for it, or find it under
    Settings → API on the workspace. It is stable and never changes.


    Every call carries your workspace's API key, as `Authorization: Bearer
    <key>` or in the `x-desert-api-key` header. The key is on the same settings
    page as the URL, and generating a new one there revokes the old one
    immediately.
servers:
  - url: https://www.rundesert.com/p/{workspaceId}
    description: Your workspace's public API
    variables:
      workspaceId:
        default: px_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        description: >-
          The id in your workspace's public URL. It is the address, not the
          credential — the API key is what authorises the call.
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Automations
    description: What this workspace can do.
  - name: Runs
    description: What it has done, and what came out.
  - name: Files
    description: Downloading what an automation produced.
  - name: Custom endpoints
    description: Anything else your agent wrote.
paths:
  /api/automations/{automationId}/runs/{runId}/result:
    get:
      tags:
        - Runs
      summary: Get a run's result
      description: >-
        What the automation produced. The shape of `result` is the automation's
        own: two automations answering different questions have no reason to
        agree on one, so nothing here reshapes it.


        An unfinished or failed run answers **409**, not a null result. That
        keeps "there is nothing yet" apart from "this automation returned null",
        which is a real answer some of them give.
      operationId: getRunResult
      parameters:
        - $ref: '#/components/parameters/AutomationId'
        - $ref: '#/components/parameters/RunId'
      responses:
        '200':
          description: The run finished and this is what it produced.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResult'
              example:
                runId: 1786945498854-80788d
                automation: invoice-extract
                status: done
                duration: 10277
                result: |-
                  **Supplier** — Acme Supply Co.

                  **Amount** — $1,240.00

                  **Due** — 2026-09-01
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The run has not finished, or it failed. Poll the run endpoint until
            `status` is `done`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotReady'
              examples:
                stillRunning:
                  summary: Still running
                  value:
                    error: the run has not finished
                    status: running
                    duration: null
                    poll: /api/automations/invoice-extract/runs/1786945498854-80788d
                failed:
                  summary: Failed
                  value:
                    error: the run failed
                    status: error
                    detail: The invoice could not be read.
                    duration: 4120
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    AutomationId:
      name: automationId
      in: path
      required: true
      description: The automation's id, as returned by `GET /api/automations`.
      schema:
        type: string
      example: invoice-extract
    RunId:
      name: runId
      in: path
      required: true
      description: >-
        A run id. A run is only readable through the automation that produced
        it.
      schema:
        type: string
      example: 1786945498854-80788d
  schemas:
    RunResult:
      type: object
      properties:
        runId:
          type: string
        automation:
          type: string
        status:
          $ref: '#/components/schemas/RunStatus'
        duration:
          type: integer
          description: Milliseconds.
        result:
          description: >-
            Whatever the automation returned, unchanged. Often markdown, often
            an object. Ask the agent what a given automation returns, or read
            one finished run.
          oneOf:
            - type: string
            - type: object
            - type: array
            - type: number
            - type: boolean
            - type: 'null'
    NotReady:
      type: object
      properties:
        error:
          type: string
        status:
          $ref: '#/components/schemas/RunStatus'
        detail:
          type: string
          description: Present when the run failed.
        duration:
          type:
            - integer
            - 'null'
        poll:
          type: string
          description: 'Present when the run is still going: the path to check.'
    RunStatus:
      type: string
      enum:
        - running
        - done
        - error
      description: >-
        `running` means it has not finished. `error` means it finished badly,
        and `error` on the run says why.
    Error:
      type: object
      properties:
        error:
          type: string
        detail:
          type: string
  responses:
    Unauthorized:
      description: >-
        The API key was missing or wrong. Check Settings → API for the current
        one — generating a new key there stops the old one working immediately.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    NotFound:
      description: No such automation, or no such run under it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: No such automation
    RateLimited:
      description: >-
        600 requests a minute across the whole workspace, shared with anyone
        loading its pages. Wait and try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate limited
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your workspace's API key, from Settings → API. Sent as `Authorization:
        Bearer dk_...`.
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-desert-api-key
      description: >-
        The same key, for callers whose `Authorization` header is already spoken
        for by their own auth. Send one form or the other, not both.

````