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

# List Runs

> List all runs for the authenticated organization.

Supports pagination and filtering by workflow, machine, and status.
Returns runs with their associated workflow and machine data.

Use the `include` parameter to fetch related resources in the response.
Related resources are returned in the `included` array following the JSON:API pattern.
Resources are deduplicated across all items in the list.



## OpenAPI

````yaml /openapi.json get /v1/runs
openapi: 3.1.0
info:
  title: Cyberdesk Cloud
  description: >-
    The Cyberdesk API provides programmatic access to all platform features,
    enabling you to automate desktop tasks at scale.
  version: 1.0.0
servers:
  - url: https://api.cyberdesk.io
    description: Production server
  - url: https://cyberdesk-api-dev.fly.dev
    description: Development server
security: []
paths:
  /v1/runs:
    get:
      tags:
        - runs
      summary: List Runs
      description: >-
        List all runs for the authenticated organization.


        Supports pagination and filtering by workflow, machine, and status.

        Returns runs with their associated workflow and machine data.


        Use the `include` parameter to fetch related resources in the response.

        Related resources are returned in the `included` array following the
        JSON:API pattern.

        Resources are deduplicated across all items in the list.
      operationId: list_runs_v1_runs_get
      parameters:
        - name: workflow_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Filter by workflow ID
            title: Workflow Id
          description: Filter by workflow ID
        - name: machine_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Filter by machine ID
            title: Machine Id
          description: Filter by machine ID
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Filter by session ID
            title: Session Id
          description: Filter by session ID
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/RunStatus'
              - type: 'null'
            description: Filter by run status
            title: Status
          description: Filter by run status
        - name: created_at_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter runs created at or after this ISO timestamp (UTC)
            title: Created At From
          description: Filter runs created at or after this ISO timestamp (UTC)
        - name: created_at_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter runs created at or before this ISO timestamp (UTC)
            title: Created At To
          description: Filter runs created at or before this ISO timestamp (UTC)
        - name: sort_mode
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/RunListSortMode'
            description: >-
              Run sort mode. 'activity' prioritizes running/scheduling and
              recent completions. 'created_at_desc' returns strict
              reverse-chronological order.
            default: activity
          description: >-
            Run sort mode. 'activity' prioritizes running/scheduling and recent
            completions. 'created_at_desc' returns strict reverse-chronological
            order.
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Search runs by id, input_values, output_data, error, session_alias
              (case-insensitive substring match)
            title: Search
          description: >-
            Search runs by id, input_values, output_data, error, session_alias
            (case-insensitive substring match)
        - name: deep_search
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If true, also search run_message_history (slower but more
              comprehensive)
            default: false
            title: Deep Search
          description: >-
            If true, also search run_message_history (slower but more
            comprehensive)
        - name: fields
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/RunField'
              - type: 'null'
            description: >-
              Optional list of fields to include per run. Always includes: id,
              workflow_id, machine_id, status, created_at. Provide multiple
              'fields=' params to include more.
            title: Fields
          description: >-
            Optional list of fields to include per run. Always includes: id,
            workflow_id, machine_id, status, created_at. Provide multiple
            'fields=' params to include more.
        - name: include
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated list of related resources to include. Allowed
              values: workflow, machine, machine.pools. Example:
              include=workflow,machine
            title: Include
          description: >-
            Comma-separated list of related resources to include. Allowed
            values: workflow, machine, machine.pools. Example:
            include=workflow,machine
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 100
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponseWithIncludes_RunResponse_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    RunStatus:
      type: string
      enum:
        - scheduling
        - running
        - running_checks
        - success
        - cancelled
        - task_failed
        - error
      title: RunStatus
    RunListSortMode:
      type: string
      enum:
        - activity
        - created_at_desc
      title: RunListSortMode
    RunField:
      type: string
      enum:
        - user_id
        - organization_id
        - error
        - output_data
        - input_attachment_ids
        - output_attachment_ids
        - run_message_history
        - input_values
        - main_prompt
        - model_metadata
        - pool_ids
        - sensitive_input_aliases
        - usage_metadata
        - session_id
        - session_alias
        - release_session_after
        - started_at
        - ended_at
        - post_run_checks
        - machine_id
      title: RunField
      description: >-
        Selectable run fields for projection in list endpoints.


        These are optional fields beyond the essential identifiers that are
        always returned

        (id, workflow_id, machine_id, status, created_at).
    PaginatedResponseWithIncludes_RunResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RunResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        skip:
          type: integer
          title: Skip
        limit:
          type: integer
          title: Limit
        included:
          anyOf:
            - items:
                $ref: '#/components/schemas/IncludedResource'
              type: array
            - type: 'null'
          title: Included
          description: Related resources requested via the `include` query parameter
      type: object
      required:
        - items
        - total
        - skip
        - limit
      title: PaginatedResponseWithIncludes[RunResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunResponse:
      properties:
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
        machine_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Machine Id
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        organization_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Id
        status:
          $ref: '#/components/schemas/RunStatus'
        error:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Error
        output_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output Data
        input_attachment_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Input Attachment Ids
        output_attachment_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Output Attachment Ids
        run_message_history:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Run Message History
        input_values:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input Values
        main_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Main Prompt
          description: >-
            Per-run prompt override used for execution. Null means the run falls
            back to the workflow's current main_prompt.
        model_metadata:
          anyOf:
            - $ref: '#/components/schemas/WorkflowModelMetadata'
            - type: 'null'
          description: >-
            Per-run model metadata overrides used for execution. Null means the
            run falls back to the workflow's model_metadata.
        pool_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Pool Ids
        sensitive_input_aliases:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Sensitive Input Aliases
        usage_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage Metadata
          description: >-
            Arbitrary usage/billing metadata captured during a run (schema is
            flexible)
        post_run_checks:
          anyOf:
            - items:
                $ref: '#/components/schemas/RunPostRunCheckSnapshot'
              type: array
            - type: 'null'
          title: Post Run Checks
          description: Version-tolerant snapshot/results for the run's post-run checks.
        session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Id
        session_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Alias
        release_session_after:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Release Session After
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
      type: object
      required:
        - workflow_id
        - machine_id
        - id
        - status
        - created_at
      title: RunResponse
      description: Run response schema
    IncludedResource:
      properties:
        type:
          type: string
          title: Type
          description: Resource type (e.g., 'workflow', 'machine', 'pool')
        id:
          type: string
          format: uuid
          title: Id
          description: Resource UUID
      additionalProperties: true
      type: object
      required:
        - type
        - id
      title: IncludedResource
      description: >-
        A resource in the JSON:API-style included array.


        Each included resource has a `type` field indicating what kind of
        resource it is

        (e.g., "workflow", "machine", "pool") and an `id` field with the
        resource's UUID.

        All other fields from the resource's response model are included.


        Example:
            {
                "type": "workflow",
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "name": "My Workflow",
                "main_prompt": "Do something...",
                "created_at": "2024-01-15T10:30:00Z"
            }
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          additionalProperties: true
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkflowModelMetadata:
      properties:
        main_agent_model_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Main Agent Model Id
          description: >-
            ModelConfiguration.id used for the main agent. Null → Cyberdesk
            default.
        cache_detection_model_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Cache Detection Model Id
          description: >-
            ModelConfiguration.id used for cache detection. Null → Cyberdesk
            default.
        fallback_model_1_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Fallback Model 1 Id
          description: ModelConfiguration.id used as fallback 1 (global across agents).
        fallback_model_2_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Fallback Model 2 Id
          description: ModelConfiguration.id used as fallback 2 (global across agents).
      type: object
      title: WorkflowModelMetadata
      description: >-
        JSONB-backed workflow model configuration metadata.


        Stored on the Workflow row as `model_metadata` to avoid adding many FK
        columns.

        All fields are optional; when missing/null, the system falls back to
        Cyberdesk defaults.
    RunPostRunCheckSnapshot:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        post_run_check_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Post Run Check Id
        snapshot_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Snapshot Version
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        type:
          anyOf:
            - $ref: '#/components/schemas/PostRunCheckType'
            - type: 'null'
        order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order
        file_target_mode:
          anyOf:
            - $ref: '#/components/schemas/PostRunCheckFileTargetMode'
            - type: 'null'
        file_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: File Names
        file_name_regex:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name Regex
        expected_match_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expected Match Count
        expected_match_count_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Match Count Ref
        loop_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Loop Input
        loop_item_filename_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Loop Item Filename Template
        allow_missing_attachments:
          type: boolean
          title: Allow Missing Attachments
          default: false
        check_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Check Prompt
        model:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Model
        status:
          $ref: '#/components/schemas/PostRunCheckStatus'
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        messages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Messages
        matched_filenames:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Matched Filenames
      additionalProperties: true
      type: object
      required:
        - status
      title: RunPostRunCheckSnapshot
      description: >-
        Version-tolerant run-level snapshot/result for one post-run check
        invocation.
    PostRunCheckType:
      type: string
      enum:
        - run_attachment_exists
        - run_attachment_image_check
        - output_data_passes_schema_validation
        - output_data_agentic_check
      title: PostRunCheckType
    PostRunCheckFileTargetMode:
      type: string
      enum:
        - exact
        - regex
        - loop_items
      title: PostRunCheckFileTargetMode
    PostRunCheckStatus:
      type: string
      enum:
        - pending
        - running
        - success
        - failed
        - infra_error
        - cancelled
      title: PostRunCheckStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````