> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-studio-tools-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Trace Filter Schema

> Returns the available filterable fields, their types, valid operators, and enum values.

The frontend uses this to dynamically build the filter bar UI:
- Field dropdown populated from `fields[].key`
- Operator dropdown changes per field type
- Value input shows autocomplete for enum fields (e.g., status)
- Logical operators (AND, OR) for combining clauses



## OpenAPI

````yaml /reference-api/openapi.yaml get /traces/filter-schema
openapi: 3.1.0
info:
  title: Agno API Reference
  description: The all-in-one, private, secure agent platform that runs in your cloud.
  version: 2.5.6
servers: []
security: []
paths:
  /traces/filter-schema:
    get:
      tags:
        - Traces
        - Traces
      summary: Get Trace Filter Schema
      description: >-
        Returns the available filterable fields, their types, valid operators,
        and enum values.


        The frontend uses this to dynamically build the filter bar UI:

        - Field dropdown populated from `fields[].key`

        - Operator dropdown changes per field type

        - Value input shows autocomplete for enum fields (e.g., status)

        - Logical operators (AND, OR) for combining clauses
      operationId: get_traces_filter_schema
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterSchemaResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    FilterSchemaResponse:
      properties:
        fields:
          items:
            $ref: '#/components/schemas/FilterFieldSchema'
          type: array
          title: Fields
          description: Available filterable fields
        logical_operators:
          items:
            type: string
          type: array
          title: Logical Operators
          description: Logical operators for combining filter clauses
          default:
            - AND
            - OR
      type: object
      required:
        - fields
      title: FilterSchemaResponse
      description: >-
        Response for the filter schema endpoint. Tells the FE what fields,
        operators, and values are available.
    BadRequestResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: BadRequestResponse
      example:
        detail: Bad request
        error_code: BAD_REQUEST
    UnauthenticatedResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: UnauthenticatedResponse
      example:
        detail: Unauthenticated access
        error_code: UNAUTHENTICATED
    NotFoundResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: NotFoundResponse
      example:
        detail: Not found
        error_code: NOT_FOUND
    ValidationErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: ValidationErrorResponse
      example:
        detail: Validation error
        error_code: VALIDATION_ERROR
    InternalServerErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: InternalServerErrorResponse
      example:
        detail: Internal server error
        error_code: INTERNAL_SERVER_ERROR
    FilterFieldSchema:
      properties:
        key:
          type: string
          title: Key
          description: Column/field name used in filter expressions
        label:
          type: string
          title: Label
          description: Human-readable display label for the UI
        type:
          type: string
          title: Type
          description: 'Field data type: string, number, datetime, enum'
        operators:
          items:
            type: string
          type: array
          title: Operators
          description: List of valid filter operators for this field
        values:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Values
          description: Allowed enum values (for autocomplete/dropdown)
      type: object
      required:
        - key
        - label
        - type
        - operators
      title: FilterFieldSchema
      description: Schema describing a single filterable field for the frontend filter bar.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````