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

# List traces with optional filters



## OpenAPI

````yaml get /api/agent-server/traces
openapi: 3.0.3
info:
  title: HasteKit Gateway API
  description: API specification for the HasteKit Gateway
  version: 1.0.0
servers:
  - url: http://localhost:6060
    description: Local development server
  - url: https://app.hastekit.ai
    description: Production server
security: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Projects
    description: Project management endpoints
  - name: Agents
    description: Agent configuration endpoints
  - name: Models
    description: Model configuration endpoints
  - name: Prompts
    description: Prompt management endpoints
  - name: Providers
    description: Provider and API key management endpoints
  - name: VirtualKeys
    description: Virtual key management endpoints
  - name: MCPServers
    description: MCP server management endpoints
  - name: Schemas
    description: Schema management endpoints
  - name: Conversations
    description: Conversation, thread, and message management endpoints
  - name: Gateway
    description: LLM Gateway endpoints
  - name: Converse
    description: Agent conversation endpoints
  - name: Traces
    description: Tracing and observability endpoints
paths:
  /api/agent-server/traces:
    get:
      tags:
        - Traces
      summary: List traces with optional filters
      operationId: listTraces
      parameters:
        - name: service_name
          in: query
          required: false
          schema:
            type: string
        - name: span_name
          in: query
          required: false
          schema:
            type: string
        - name: trace_id
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
        - name: min_duration
          in: query
          required: false
          schema:
            type: number
            format: float
        - name: max_duration
          in: query
          required: false
          schema:
            type: number
            format: float
        - name: has_errors
          in: query
          required: false
          schema:
            type: boolean
        - name: start_time
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: end_time
          in: query
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Traces retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TracesListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    TracesListResponse:
      allOf:
        - $ref: '#/components/schemas/StandardResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                traces:
                  type: array
                  items:
                    type: object
                total:
                  type: integer
                limit:
                  type: integer
                offset:
                  type: integer
    StandardResponse:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
        data:
          type: object
        status:
          type: integer
        errorDetails:
          type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardResponse'
          example:
            error: true
            message: Invalid request
            status: 400
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StandardResponse'
          example:
            error: true
            message: Internal server error
            status: 500

````