> ## 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 traces for a session



## OpenAPI

````yaml /public-openapi.json get /agent/v1/sessions/{session_id}/traces
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:
  /agent/v1/sessions/{session_id}/traces:
    get:
      tags:
        - Agent
      summary: List traces for a session
      operationId: agent.listSessionTraces
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
        - name: start_time_unix_seconds
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: end_time_unix_seconds
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: sort
          in: query
          required: false
          schema:
            type: string
        - name: user_id
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agent-TraceListEnvelope'
          description: HTTP 200 response.
        '400':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/agent-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - invalid_query
          description: HTTP 400 response.
        '401':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/agent-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/agent-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/agent-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/agent-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/agent-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - auth_unavailable
                          - service_overloaded
          description: HTTP 503 response.
        '504':
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/agent-ProblemDetails'
                  - type: object
                    required:
                      - code
                    properties:
                      code:
                        type: string
                        enum:
                          - request_timeout
          description: HTTP 504 response.
      security:
        - bearer: []
components:
  schemas:
    agent-TraceListEnvelope:
      type: object
      required:
        - items
        - page
        - access
      properties:
        access:
          $ref: '#/components/schemas/agent-AccessView'
        items:
          type: array
          items:
            $ref: '#/components/schemas/agent-TraceSummaryView'
        page:
          $ref: '#/components/schemas/agent-CursorPage'
    agent-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'
    agent-AccessView:
      type: object
      required:
        - audience
        - slice
        - basis
        - allow_user_filter
      properties:
        allow_user_filter:
          type: boolean
        audience:
          type: string
        basis:
          type: string
        detail:
          type: string
        slice:
          type: string
    agent-TraceSummaryView:
      type: object
      required:
        - trace_id
        - workspace_id
        - is_complete
        - started_at_unix_seconds
        - trace_status
        - summary
      properties:
        attributes: {}
        duration_ms:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        ended_at_unix_seconds:
          type:
            - integer
            - 'null'
          format: int64
        is_complete:
          type: boolean
        match_confidence:
          type:
            - string
            - 'null'
        metadata: {}
        models:
          type:
            - array
            - 'null'
          items:
            type: string
        providers:
          type:
            - array
            - 'null'
          items:
            type: string
        root_span_id:
          type:
            - string
            - 'null'
        root_span_name:
          type:
            - string
            - 'null'
        run_status:
          type:
            - string
            - 'null'
        service_name:
          type:
            - string
            - 'null'
        started_at_unix_seconds:
          type: integer
          format: int64
        summary:
          $ref: '#/components/schemas/agent-TraceSummaryStats'
        title:
          type:
            - string
            - 'null'
        trace_id:
          type: string
        trace_status:
          $ref: '#/components/schemas/agent-TraceStatus'
        user_id:
          type:
            - string
            - 'null'
        workspace_id:
          type: string
    agent-CursorPage:
      type: object
      required:
        - limit
      properties:
        limit:
          type: integer
          format: int32
          minimum: 0
        next_cursor:
          type:
            - string
            - 'null'
    agent-TraceSummaryStats:
      type: object
      required:
        - span_count
        - error_count
      properties:
        error_count:
          type: integer
          format: int64
          minimum: 0
        input_tokens:
          type:
            - integer
            - 'null'
          format: int64
        output_tokens:
          type:
            - integer
            - 'null'
          format: int64
        span_count:
          type: integer
          format: int64
          minimum: 0
        total_cost_usd:
          type:
            - number
            - 'null'
          format: double
        total_tokens:
          type:
            - integer
            - 'null'
          format: int64
    agent-TraceStatus:
      type: string
      enum:
        - ok
        - error
        - unset
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````