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

# List thread traces

> Returns every ready trace in the given trace's thread, enriched and ordered oldest first. Empty for standalone traces.



## OpenAPI

````yaml https://api.uselemma.ai/openapi.json get /traces/{trace_id}/thread
openapi: 3.1.0
info:
  title: Lemma Platform API
  description: Lemma Platform HTTP API for AI observability and workspace operations.
  version: 0.1.0
servers:
  - url: https://api.uselemma.ai
    description: Lemma production API
security:
  - bearerAuth: []
paths:
  /traces/{trace_id}/thread:
    get:
      tags:
        - Traces
      summary: List thread traces
      description: >-
        Returns every ready trace in the given trace's thread, enriched and
        ordered oldest first. Empty for standalone traces.
      operationId: get_thread_traces
      parameters:
        - schema:
            type: string
          in: path
          name: trace_id
          required: true
      responses:
        '200':
          description: Thread traces
          content:
            application/json:
              schema:
                type: object
                properties:
                  thread_id:
                    type:
                      - string
                      - 'null'
                  traces:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        otel_trace_id:
                          type: string
                        project_id:
                          type: string
                        service_name:
                          type:
                            - string
                            - 'null'
                        agent_name:
                          type:
                            - string
                            - 'null'
                        thread_id:
                          type:
                            - string
                            - 'null'
                        thread_trace_count:
                          type:
                            - number
                            - 'null'
                        agent_input:
                          type: 'null'
                        agent_input_display:
                          type:
                            - string
                            - 'null'
                        agent_output:
                          type: 'null'
                        has_error:
                          type: boolean
                        has_occurrences:
                          type: boolean
                        span_count:
                          type: number
                        total_duration_ms:
                          type:
                            - number
                            - 'null'
                        created_at:
                          type: string
                        updated_at:
                          type: string
                      required:
                        - id
                        - otel_trace_id
                        - project_id
                        - service_name
                        - agent_name
                        - thread_id
                        - thread_trace_count
                        - agent_input_display
                        - has_error
                        - has_occurrences
                        - span_count
                        - total_duration_ms
                        - created_at
                        - updated_at
                      additionalProperties: true
                required:
                  - thread_id
                  - traces
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````