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

# Search Traces

> Search traces.



## OpenAPI

````yaml /openapi/api.json get /v1/telemetry/traces
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/telemetry/traces:
    get:
      tags:
        - Dome
        - Telemetry
      summary: Search Traces
      description: Search traces.
      operationId: search_traces_v1_telemetry_traces_get
      parameters:
        - name: time_range
          in: query
          required: false
          schema:
            enum:
              - 15m
              - 30m
              - 1h
              - 2h
              - 6h
              - 1d
              - 7d
              - 30d
            type: string
            description: Window to search for traces
            default: 1h
            title: Time Range
          description: Window to search for traces
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: Maximum number of traces to return
            default: 20
            title: Limit
          description: Maximum number of traces to return
        - name: service_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by root service
            title: Service Name
          description: Filter by root service
        - name: agent_configuration_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by agent id
            title: Agent Configuration Id
          description: Filter by agent id
        - name: min_duration_ms
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Lower bound on trace duration (ms)
            title: Min Duration Ms
          description: Lower bound on trace duration (ms)
        - name: max_duration_ms
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Upper bound on trace duration (ms)
            title: Max Duration Ms
          description: Upper bound on trace duration (ms)
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Advanced TraceQL query
            title: Query
          description: Advanced TraceQL query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TraceSearchResponse:
      properties:
        traces:
          items:
            $ref: '#/components/schemas/TraceSummaryResponse'
          type: array
          title: Traces
        metrics:
          anyOf:
            - $ref: '#/components/schemas/TraceSearchMetricsResponse'
            - type: 'null'
      type: object
      title: TraceSearchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TraceSummaryResponse:
      properties:
        trace_id:
          type: string
          title: Trace Id
          description: Hex encoded trace identifier
        root_service_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Root Service Name
        root_trace_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Root Trace Name
        start_time_unix_nano:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Time Unix Nano
        duration_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Ms
      type: object
      required:
        - trace_id
      title: TraceSummaryResponse
    TraceSearchMetricsResponse:
      properties:
        inspectedTraces:
          anyOf:
            - type: integer
            - type: 'null'
          title: Inspectedtraces
        inspectedBytes:
          anyOf:
            - type: string
            - type: 'null'
          title: Inspectedbytes
        completedJobs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Completedjobs
        totalJobs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totaljobs
      type: object
      title: TraceSearchMetricsResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````