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

# upstack filters

> List the filter-fields catalog from the command line. Find canonical filter field ids, value types, operators, and applicable contexts before constructing a --filter.

List the catalog of filter fields available across every query endpoint. Each
entry declares its operators, value type, and the contexts it applies in.
Useful for finding canonical filter field ids before constructing a
[query](/cli/query), [attribution query](/cli/query-attribution),
[cohort analysis](/cli/query-cohort), or
[channel-details listing](/cli/query-channel-details). Wraps
`GET /api/filters` — see the [API reference](/api-reference/overview).

## Usage

```bash theme={null}
upstack filters
```

The endpoint takes no parameters — the full catalog is returned in one call.
Results are cached locally for 1 hour; pass `--no-cache` to refetch.

## Flags

| Flag              | Description                                                                           |
| ----------------- | ------------------------------------------------------------------------------------- |
| `--search <term>` | Filter results by keyword (matches `field` and `label`).                              |
| `--detail`        | Include label, description, value type, supported operators, and applicable contexts. |
| `--operators`     | Show supported operators inline next to each field.                                   |
| `--json`          | Print the raw response as JSON (one object per field).                                |
| `--no-cache`      | Bypass the local 1-hour cache and refetch.                                            |

## Examples

```bash theme={null}
upstack filters
upstack filters --search utm
upstack filters --detail
upstack filters --operators
upstack filters --json | jq '.[] | select(.applicableContexts | index("attribution"))'
```

## Narrowing by endpoint context

Every entry carries an `applicableContexts` array listing which endpoints it
applies to (`query_measures`, `cohort_analysis`, `products_report`,
`attribution`, `channel_details`, `emq_analytics`). Use `--detail` to see them
inline, or `--json` to narrow with `jq`:

```bash theme={null}
# Fields valid on POST /api/query-channel-details
upstack filters --json | jq '.[] | select(.applicableContexts | index("channel_details"))'
```
