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

# List traces



## OpenAPI

````yaml openapi.json GET /v1/traces
openapi: 3.1.0
info:
  title: Egma Platform API
  version: 1.0.0
  description: >-
    The customer-facing HTTP interface used by Egma's web app, CLI, and outside
    clients.
servers:
  - url: https://app.egma.ai
security: []
paths:
  /v1/traces:
    get:
      tags:
        - Traces
      summary: List traces
      operationId: listTraces
      parameters:
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: projectId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
        - name: source
          in: query
          required: false
          schema:
            type: string
            enum:
              - simulation
              - production
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
        - name: pageToken
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A page of traces inside the requested window.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traces:
                    type: array
                    items:
                      type: object
                      properties:
                        traceId:
                          type: string
                        startedAt:
                          type: string
                          format: date-time
                        endedAt:
                          type: string
                          format: date-time
                        durationNs:
                          type: string
                        spanCount:
                          type: integer
                        turnCounts:
                          type: object
                          properties:
                            human:
                              type: integer
                            agent:
                              type: integer
                          required:
                            - human
                            - agent
                          additionalProperties: false
                        toolSpanCount:
                          type: integer
                        erroredSpanCount:
                          type: integer
                        source:
                          type: string
                          enum:
                            - simulation
                            - production
                        pov:
                          type: string
                          enum:
                            - persona
                            - agent
                          description: >-
                            The trace's primary source: agent for the agent's
                            own evidence, or persona for Egma's simulated
                            caller. A simulation can contain spans from both
                            sources; each span has its own pov.
                        environment:
                          type: string
                        connectionType:
                          type: string
                        providerCallId:
                          type: string
                        agentPlatform:
                          type: string
                        platformAgentId:
                          type: string
                        platformAgentName:
                          type: string
                        platformAgentVersion:
                          type: string
                        runId:
                          type: string
                        agentId:
                          type: string
                        preview:
                          type: string
                        turnResponseLatencyP90Milliseconds:
                          anyOf:
                            - type: number
                            - type: 'null'
                        turnResponseLatencyP90Partial:
                          type: boolean
                      required:
                        - traceId
                        - startedAt
                        - endedAt
                        - durationNs
                        - spanCount
                        - turnCounts
                        - toolSpanCount
                        - erroredSpanCount
                        - source
                        - pov
                        - environment
                        - connectionType
                        - providerCallId
                        - agentPlatform
                        - platformAgentId
                        - platformAgentName
                        - platformAgentVersion
                        - runId
                        - agentId
                        - preview
                        - turnResponseLatencyP90Milliseconds
                        - turnResponseLatencyP90Partial
                      additionalProperties: false
                  nextPageToken:
                    anyOf:
                      - type: string
                      - type: 'null'
                  window:
                    type: object
                    properties:
                      from:
                        type: string
                        format: date-time
                      to:
                        type: string
                        format: date-time
                    required:
                      - from
                      - to
                    additionalProperties: false
                required:
                  - traces
                  - nextPageToken
                  - window
                additionalProperties: false
        '400':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '401':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '403':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '429':
          description: The request rate limit was reached.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Refusal:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Egma API key.
    sessionCookie:
      type: apiKey
      in: cookie
      name: egma.session_token
      description: >-
        The browser session cookie issued by Egma. HTTPS deployments add the
        standard __Secure- prefix.

````