---
title: "Get Trace Filter Schema"
method: GET
path: "/traces/filter-schema"
tags: ["Traces", "Traces"]
---

# Get Trace Filter Schema

`GET /traces/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

## Response `200`

Successful Response

- FilterSchemaResponse — Response for the filter schema endpoint. Tells the FE what fields, operators, and values are available.
  - `fields` FilterFieldSchema[], required — Available filterable fields
    - `key` string, required — Column/field name used in filter expressions
    - `label` string, required — Human-readable display label for the UI
    - `type` string, required — Field data type: string, number, datetime, enum
    - `operators` string[], required — List of valid filter operators for this field
    - `values` string[], nullable — Allowed enum values (for autocomplete/dropdown)
  - `logical_operators` string[] — Logical operators for combining filter clauses

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.dev/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.dev/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agno/agno-api-reference/revisions/5f6149d395d0/schema)
