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

# List spans

> List flattened execution spans for orchestration runs (one row per executed node within a run)



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /orchestration/spans/list
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /orchestration/spans/list:
    post:
      tags:
        - Orchestration - Spans
      summary: List spans
      description: >-
        List flattened execution spans for orchestration runs (one row per
        executed node within a run)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workflowUuid:
                  title: Workflow UUID
                  description: >-
                    When set, restrict spans to this workflow. Omit to search
                    across workflows in the workspace.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                userUuid:
                  title: User UUID
                  description: User identifier to filter by.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                batchUuid:
                  title: Batch UUID
                  description: Batch identifier to filter by.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                runUuid:
                  title: Run UUID
                  description: Run identifier to filter by.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                recordId:
                  title: Record ID
                  description: Record ID to filter by.
                  type: string
                recordTitle:
                  title: Record title
                  description: Record title to filter by (SQL ilike).
                  type: string
                recordTitleOrId:
                  title: Record ID or title
                  description: >-
                    Match record id or record title (each SQL ilike); same
                    pattern as run list.
                  type: string
                parentRunUuid:
                  title: Parent run UUID
                  description: Parent run identifier to filter by.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                parentNodeUuid:
                  title: Parent node UUID
                  description: Filter by parent node UUID on the run.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                parentAgentUuid:
                  title: Parent agent UUID
                  description: >-
                    When set, restrict spans to rows whose parent agent matches
                    this UUID.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                nodeUuid:
                  title: Node UUID
                  description: Node identifier to filter by.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                nodeKind:
                  title: Node kind
                  description: Filter by node kind (native, connector, tool, agent).
                  type: string
                  enum:
                    - native
                    - connector
                    - tool
                    - agent
                nodeSlug:
                  title: Node slug
                  description: Filter by workflow node slug (exact match).
                  type: string
                nodeIntegrationSlug:
                  title: Node integration slug
                  description: Filter by connector integration slug (exact match).
                  type: string
                nodeConnectorUuid:
                  title: Node connector UUID
                  description: Filter by connector UUID.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                nodeActionSlug:
                  title: Node action slug
                  description: Filter by node action slug (exact match).
                  type: string
                nodeToolUuid:
                  title: Node tool UUID
                  description: Filter by tool node UUID.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                nodeAgentUuid:
                  title: Node agent UUID
                  description: Filter by agent node UUID.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                nodeReleaseUuid:
                  title: Node release UUID
                  description: Filter by release UUID referenced on the node.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                executionTitle:
                  title: Execution title
                  description: Filter by execution title (SQL ilike).
                  type: string
                executionStatuses:
                  title: Execution statuses
                  description: Execution statuses to include.
                  type: array
                  items:
                    type: string
                    enum:
                      - pending
                      - success
                      - error
                executionStartedAfter:
                  type: string
                  title: Execution started after
                  description: >-
                    Include spans whose execution started after this timestamp
                    (ISO string). Required.
                executionStartedBefore:
                  title: Execution started before
                  description: >-
                    Include spans whose execution started on or before this
                    timestamp (ISO string).
                  type: string
                limit:
                  title: Limit
                  description: Maximum number of spans to return.
                  type: number
                offset:
                  title: Offset
                  description: Number of spans to skip.
                  type: number
              required:
                - executionStartedAfter
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  spans:
                    type: array
                    items:
                      type: object
                      properties:
                        workspaceUuid:
                          type: string
                        workflowUuid:
                          type: string
                        userUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        batchUuid:
                          type: string
                        traceUuid:
                          type: string
                        recordId:
                          type: string
                        recordTitle:
                          type: string
                        runUuid:
                          type: string
                        runContextS3Filename:
                          type: string
                        runComputedConfigsS3Filename:
                          type: string
                        parentRunUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        parentNodeUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        parentBatchUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        parentAgentUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        parentChatUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        parentMessageUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        isGroupParent:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        nodeUuid:
                          type: string
                        nodeKind:
                          type: string
                          enum:
                            - native
                            - connector
                            - tool
                            - agent
                        nodeSlug:
                          type: string
                        nodeActionSlug:
                          type: string
                        nodeConnectorUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeIntegrationSlug:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeToolUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeAgentUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeReleaseUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeBatchUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeRunUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeMessageUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        nodeChildIndex:
                          anyOf:
                            - type: number
                            - type: 'null'
                        nodeWaitUntilFinished:
                          type: boolean
                        nodeNextUuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        executionIndex:
                          type: number
                        executionStatus:
                          type: string
                          enum:
                            - pending
                            - success
                            - error
                        executionErrorMessage:
                          anyOf:
                            - type: string
                            - type: 'null'
                        executionTitle:
                          anyOf:
                            - type: string
                            - type: 'null'
                        executionIconUrl:
                          anyOf:
                            - type: string
                            - type: 'null'
                        executionCreditsUsedCount:
                          type: number
                        executionStartedAt:
                          type: string
                        executionUpdatedAt:
                          type: string
                        executionFinishedAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - workspaceUuid
                        - workflowUuid
                        - userUuid
                        - batchUuid
                        - traceUuid
                        - recordId
                        - recordTitle
                        - runUuid
                        - runContextS3Filename
                        - runComputedConfigsS3Filename
                        - parentRunUuid
                        - parentNodeUuid
                        - parentBatchUuid
                        - parentAgentUuid
                        - parentChatUuid
                        - parentMessageUuid
                        - isGroupParent
                        - nodeUuid
                        - nodeKind
                        - nodeSlug
                        - nodeActionSlug
                        - nodeConnectorUuid
                        - nodeIntegrationSlug
                        - nodeToolUuid
                        - nodeAgentUuid
                        - nodeReleaseUuid
                        - nodeBatchUuid
                        - nodeRunUuid
                        - nodeMessageUuid
                        - nodeChildIndex
                        - nodeWaitUntilFinished
                        - nodeNextUuid
                        - executionIndex
                        - executionStatus
                        - executionErrorMessage
                        - executionTitle
                        - executionIconUrl
                        - executionCreditsUsedCount
                        - executionStartedAt
                        - executionUpdatedAt
                        - executionFinishedAt
                      additionalProperties: false
                    title: Spans
                    description: Spans matching the filter.
                  count:
                    type: number
                    title: Count
                    description: Total count of matching spans.
                required:
                  - spans
                  - count
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````