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

# List spans in one of a user's traces



## OpenAPI

````yaml /public-openapi.json get /registry/v1/users/{user_id}/traces/{trace_id}/spans
openapi: 3.1.0
info:
  title: Atlan public API
  version: current
  description: >-
    Public HTTP API reference for Registry, Skills, Agents, outputs, files, MCP
    servers and tools, and OTLP telemetry ingestion.
servers:
  - url: https://agentgateway.atlan.engineering
    description: Atlan API base URL
security:
  - bearer: []
tags:
  - name: Core
  - name: Skill
  - name: Agent
  - name: Files
  - name: MCP
  - name: Observability
paths:
  /registry/v1/users/{user_id}/traces/{trace_id}/spans:
    get:
      tags:
        - Core
      summary: List spans in one of a user's traces
      operationId: registry.listUserTraceSpans
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
        - name: trace_id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: fields
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/registry-SpanListEnvelope'
          description: HTTP 200 response.
        '400':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - invalid_query
                          - invalid_request
          description: HTTP 400 response.
        '401':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - alg_mismatch
                          - alg_not_allowed
                          - audience_mismatch
                          - invalid_api_key
                          - missing_identity
                          - missing_org
                          - missing_user
                          - signature_invalid
                          - token_expired
                          - token_malformed
                          - token_missing
                          - token_not_yet_valid
                          - token_rejected
                          - token_service_account_unbound
                          - unknown_account
                          - unknown_key
                          - untrusted_issuer
          description: HTTP 401 response.
        '403':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - access_denied
                          - account_suspended
          description: HTTP 403 response.
        '404':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
          description: HTTP 404 response.
        '500':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - internal_error
          description: HTTP 500 response.
        '503':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - auth_unavailable
                          - not_configured
                          - service_overloaded
                          - service_unavailable
          description: HTTP 503 response.
        '504':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/registry-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - request_timeout
          description: HTTP 504 response.
      security:
        - bearer: []
components:
  schemas:
    registry-SpanListEnvelope:
      type: object
      required:
        - items
        - page
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/registry-SpanViewDto'
        page:
          $ref: '#/components/schemas/registry-CursorPage'
    registry-ProblemDetails:
      type: object
      required:
        - title
        - status
        - detail
        - code
      properties:
        code:
          type: string
        detail:
          type: string
        status:
          type: integer
          format: int32
          minimum: 0
        title:
          type: string
        trace_id:
          type:
            - string
            - 'null'
    registry-SpanViewDto:
      type: object
      required:
        - span_id
        - trace_id
        - name
        - span_type
        - span_kind
        - started_at_unix_seconds
        - span_status
      properties:
        attributes: {}
        command_name:
          type:
            - string
            - 'null'
        cost:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/registry-CostView'
        duration_ms:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        ended_at_unix_seconds:
          type:
            - integer
            - 'null'
          format: int64
        event_seq:
          type:
            - integer
            - 'null'
          format: int64
        events: {}
        input: {}
        mcp_server:
          type:
            - string
            - 'null'
        metadata: {}
        model:
          type:
            - string
            - 'null'
        name:
          type: string
        output: {}
        parent_span_id:
          type:
            - string
            - 'null'
        provider:
          type:
            - string
            - 'null'
        service_name:
          type:
            - string
            - 'null'
        skill_name:
          type:
            - string
            - 'null'
        skill_version:
          type:
            - string
            - 'null'
        span_id:
          type: string
        span_kind:
          type: string
        span_status:
          $ref: '#/components/schemas/registry-TraceStatus'
        span_type:
          type: string
        started_at_unix_seconds:
          type: integer
          format: int64
        tool_name:
          type:
            - string
            - 'null'
        tool_type:
          type:
            - string
            - 'null'
        trace_id:
          type: string
        usage:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/registry-UsageView'
    registry-CursorPage:
      type: object
      required:
        - limit
      properties:
        limit:
          type: integer
          format: int32
          minimum: 0
        next_cursor:
          type:
            - string
            - 'null'
    registry-CostView:
      type: object
      required:
        - input_cost_usd
        - output_cost_usd
        - total_cost_usd
      properties:
        input_cost_usd:
          type: number
          format: double
        output_cost_usd:
          type: number
          format: double
        source:
          type:
            - string
            - 'null'
        total_cost_usd:
          type: number
          format: double
    registry-TraceStatus:
      type: string
      enum:
        - ok
        - error
        - unset
    registry-UsageView:
      type: object
      required:
        - input_tokens
        - output_tokens
        - total_tokens
        - cache_read_tokens
        - cache_write_tokens
      properties:
        cache_read_tokens:
          type: integer
          format: int64
        cache_write_tokens:
          type: integer
          format: int64
        input_tokens:
          type: integer
          format: int64
        output_tokens:
          type: integer
          format: int64
        total_tokens:
          type: integer
          format: int64
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````