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

# API query parameters and cursor pagination

> Filter LogBrew telemetry by project, service, release, environment, severity, trace, issue status, priority, assignee, and time. Continue results with a cursor.

Each read route accepts its own query keys. A route in the
[filter matrix](#filter-matrix) rejects an unknown key or a value of the wrong
type with `422` and `validation_failed`, unless the matrix says otherwise. Friendly aliases such as `project`,
`trace`, and `user` are not query keys. Do not move a filter from one route to
another.

## Build a filtered request

Put the query string after the path. Use `--data-urlencode` so that reserved
characters stay safe. This request reads critical logs for one project from
the last 24 hours:

```bash theme={null}
curl --get "https://api.logbrew.co/api/logs" \
  --header "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "project_id=<project-uuid>" \
  --data-urlencode "severity=critical" \
  --data-urlencode "since=24h"
```

Add filters in this order:

1. Select the project with `project_id` or `project_ids`.
2. Add a time range with `since`, and optionally `until`.
3. Add service, release, environment, status, or signal-specific filters.
4. Set `limit` for a smaller page.
5. Add cursor fields only after a cursor response returns them.

Each returned row matches every filter in the request. An omitted filter uses
the route default. For example, `GET /api/logs` uses `status=active` when you
omit `status`.

## Filter matrix

Keys in the "Required" column must be in the request. All other keys are
optional.

| Route | Required | Optional query keys |
| - | - | - |
| `GET /api/logs` | None | `project_id` or `project_ids`, `severity`, `level` (compatibility alias), `status`, `search`, `trace_id`, `service_name`, `release`, `environment`, `since`, `until`, `attribute_filters`, `pagination`, `cursor_time`, `cursor_id`, `limit` |
| `GET /api/logs/attributes` | `since` | `project_id` or `project_ids`, `type`, `search`, `severity`, `level`, `service_name`, `release`, `environment`, `until`, `cursor_count`, `cursor_path`, `cursor_type`, `limit` |
| `GET /api/telemetry/issues` | None | `project_id` or `project_ids`, `status`, `severity`, `priority`, `assignee`, `service_name`, `release`, `environment`, `since`, `until`, `pagination`, `cursor_time`, `cursor_id`, `limit`, `response_version` |
| `GET /api/telemetry/issues/{issue_id}` | None | `response_version`. This route ignores other keys. |
| `GET /api/telemetry/issues/{issue_id}/events` | None | `pagination`, `cursor_time`, `cursor_id`, `limit` |
| `GET /api/telemetry/issues/assignees` | `project_id` | `response_version` |
| `GET /api/telemetry/actions` | None | `project_id` or `project_ids`, `name`, `distinct_id`, `service_name`, `release`, `environment`, `since`, `until`, `pagination`, `cursor_time`, `cursor_id`, `limit` |
| `GET /api/telemetry/metrics` | None | `project_id` or `project_ids`, `name`, `service_name`, `release`, `environment`, `since`, `until`, `pagination`, `cursor_time`, `cursor_id`, `limit` |
| `GET /api/telemetry/metrics/series` | `project_id`, `name`, `since` | `until`, `interval`, `group_by`, `service_name`, `release`, `environment`, `series_limit` |
| `GET /api/telemetry/releases` | None | `project_id` or `project_ids`, `service_name`, `release`, `environment`, `since`, `until`, `pagination`, `cursor_time`, `cursor_project_id`, `cursor_release`, `cursor_environment`, `cursor_service_name`, `limit` |
| `GET /api/telemetry/traces` | None | `project_id` or `project_ids`, `service_name`, `release`, `environment`, `status`, `since`, `until`, `min_duration_ms`, `pagination`, `cursor_time`, `cursor_trace_id`, `limit`, `response_version` |
| `GET /api/telemetry/traces/{trace_id}` and `.../summary` | None | `project_id`, `release`, `environment` |
| `GET /api/telemetry/summary/volume` | `project_id`, `since` | `until`, `interval`, `service_name`, `release`, `environment`, `response_version` |
| `GET /api/telemetry/summary/volume/combined` | `project_ids`, `since` | `until`, `interval`, `service_name`, `release`, `environment`, `response_version` |
| `GET /api/telemetry/deployments` | `project_id` | `release`, `environment`, `service_name`, `status`, `since`, `until`, `pagination`, `cursor_time`, `cursor_id`, `limit` |
| `GET /api/telemetry/deployments/{deployment_id}` | `project_id` | None |
| `GET /api/telemetry/traces/{trace_id}/investigation` | None | `project_id`, `release`, `environment`, `response_version` |
| `GET /api/telemetry/traces/{trace_id}/spans/{span_id}/investigation` | `project_id`, `release`, `environment` | None |
| `GET /api/telemetry/issues/{issue_id}/investigation` | None | `response_version`, and `selection` or `occurrence_id` |
| `GET /api/telemetry/issues/{issue_id}/correction-verification` | `baseline_occurrence_id`, `candidate_deployment_id` | None |
| `GET /api/telemetry/releases/investigation` | `project_id`, `release`, `environment`, `service_name` | `response_version` |
| `GET /api/telemetry/metrics/investigation` | `project_id`, `name`, `since` | `until`, `interval`, `group_by`, `service_name`, `release`, `environment`, `series_limit`, `response_version` |
| `GET /api/telemetry/analytics/overview` | `project_id`, `since` | `until`, `interval`, `top_limit`, `service_name`, `release`, `environment`, `response_version` |
| `GET /api/telemetry/analytics/properties` | `project_id`, `since` | `until`, `limit`, `service_name`, `release`, `environment`, `response_version` |

For issue investigation, `selection` is `first`, `latest`, or `recommended`.
Send `selection` or `occurrence_id`, not both. Both need `response_version`
from 2 through 14. With version 2 or later and no selector, LogBrew uses
`recommended`. Get an `occurrence_id` from
`GET /api/telemetry/issues/{issue_id}/events`.

The `POST` analytics routes take a JSON body. See
[Product analytics](https://docs.logbrew.co/concepts/product-analytics.md).

## Shared and signal-specific filters

`service_name`, `release`, and `environment` narrow every telemetry list. Use
the exact values that your SDK sends.

Some filters belong to one signal:

* Logs accept `search`, `trace_id`, `severity`, and `attribute_filters`.
* Logs accept `status`: `active` (default), `ignored`, or `all`. `ignored`
  selects the logs that a log rule hides from the active view.
* Issues accept issue `status`: `unresolved`, `resolved`, or `archived`.
  `ignored` is an older name for `archived` and selects the same issues.
* Issues accept `severity`: `info`, `warning`, `error`, or `critical`.
* Issues accept `priority`: `high`, `medium`, or `low`.
* Issues accept `assignee`: `me` for the issues assigned to the signed-in
  account, `none` for issues without an assignee, `my_teams` for the issues
  assigned to your teams, a user ID, or `team:<team_id>`.
* Actions and metrics accept `name`.
* Actions accept `distinct_id`.
* Traces accept trace `status` and `min_duration_ms`.
* Deployments accept `status`: `succeeded` or `failed`.

The log and issue `severity` filters compare the effective severity. If a
rule changed the severity, the filter uses the rule value. See
[Severity values](https://docs.logbrew.co/reference/telemetry-response-shapes.md#severity-values).

## Time range

`since` accepts a positive whole number of seconds, minutes, hours, or days, such as `30m`, `24h`, or `7d`, or an RFC3339 timestamp. A compact duration is relative to the time of
each request.

`until` accepts an RFC3339 timestamp only. It is an exclusive end time: a row
at exactly `until` is not in the result. `since` is inclusive. For example,
`since=2026-10-01T00:00:00Z` and `until=2026-10-02T00:00:00Z` select 1 full
day. LogBrew compares times to the millisecond.

`until` must be later than `since`. If it is not, or if `until` is not an
RFC3339 timestamp, the request fails with `422` and `validation_failed`.

For a multi-page read, choose one RFC3339 start time and keep it on every page.
Keep the same `until` on every page too.

This request reads error logs from 1 day:

```bash theme={null}
curl --get "https://api.logbrew.co/api/logs" \
  --header "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "project_id=<project-uuid>" \
  --data-urlencode "severity=error" \
  --data-urlencode "since=2026-10-01T00:00:00Z" \
  --data-urlencode "until=2026-10-02T00:00:00Z"
```

> [!NOTE]
>
> The deployment list uses different time rules. Its `since` and `until`
> accept RFC3339 timestamps only, and both are inclusive. They compare the
> time when the deployment finished.

## Issue response version

The issue list and the issue detail accept `response_version=1`,
`response_version=2`, `response_version=3`, or `response_version=4`. Version 1 is the default.
Another value fails with `422` and `validation_failed`.

* Version 1 shows the archived state as `ignored`. It does not show priority.
* Version 2 shows the archived state as `archived`. It adds `priority` and
  `priority_source`.
* Version 3 has all version 2 fields. It adds `assignee`.
* Version 4 has all version 3 fields. `assignee` has `type`: `user` or `team`.

Every version accepts `status=archived`, `priority`, and `assignee`. See the
[issue response](https://docs.logbrew.co/reference/telemetry-response-shapes.md#issue-response).

## Severity filter

Use `severity=info|warning|error|critical` on `GET /api/logs`. The older
`level` key is a compatibility alias. Both keys accept the canonical values
and the aliases `trace`, `debug`, `warn`, and `fatal`. LogBrew changes an
alias to its canonical value before it compares.

If a request sends both `severity` and `level`, LogBrew normalizes both first.
Conflicting values are rejected with:

```text theme={null}
log severity and level filters conflict; use one value
```

## Trace filters

For trace discovery, `status` is `error` or `ok`. Omit it to include both.
`min_duration_ms` must be zero or greater. It applies only to trace discovery.

This request finds error traces that took at least 500 milliseconds:

```bash theme={null}
curl --get "https://api.logbrew.co/api/telemetry/traces" \
  --header "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "project_id=<project-uuid>" \
  --data-urlencode "status=error" \
  --data-urlencode "min_duration_ms=500" \
  --data-urlencode "since=7d"
```

For trace detail and summary, percent-encode `trace_id` as the path segment.
Do not send it as a query key.

## Project scope

Use `project_id=<project-uuid>` to read one project. On the routes that list
`project_ids` in the matrix, use `project_ids=<uuid>,<uuid>` for an exact set
of 2 to 50 projects. On those routes, omit both keys to read every project
that the account can read. A route that requires `project_id` accepts 1
project only. `GET /api/telemetry/summary/volume/combined` requires
`project_ids` and accepts 1 to 50 IDs.

```text theme={null}
project_id=00000000-0000-4000-8000-000000000001
project_ids=00000000-0000-4000-8000-000000000001,00000000-0000-4000-8000-000000000002
```

LogBrew rejects these selections with `422` and `validation_failed`:

* A request that has both `project_id` and `project_ids`.
* A `project_ids` value with fewer than 2 or more than 50 IDs.
* A duplicate ID or an ID that is not a UUID.

If one ID in `project_ids` is a project that the account cannot read, the
request fails with `404` and `not_found`. Do not remove that ID and continue.
Ask the user to choose a new set.

Keep the same project scope on every cursor page. Do not remove the project
filter after an empty result, because that asks a different question.

## Bucketed series

`GET /api/telemetry/metrics/series` returns one metric as time buckets.
`GET /api/telemetry/summary/volume` returns signal counts as time buckets.
`GET /api/telemetry/summary/volume/combined` returns the same counts for a set
of projects together. A trace with spans in more than 1 selected project
counts once. These routes use these rules:

* `since` is required. `until` is optional and defaults to the request time.
* The range from `since` to `until` is at most 31 days.
* `interval` is `auto`, `1m`, `5m`, `15m`, `1h`, `6h`, or `1d`. The default is
  `auto`. An interval that makes more than 500 buckets fails.
* `service_name`, `release`, and `environment` are exact filters.

For metric series, `name` is the exact metric name from
`GET /api/telemetry/metrics`. `group_by` is `none`, `service_name`, `release`,
or `environment`. `series_limit` is 1 to 20.

For signal volume and combined signal volume, `until` must not be in the
future, and `response_version` is `1` only.

## Filter log attributes

Use `GET /api/logs/attributes` to find the attribute paths and types that you
can search. Then send `attribute_filters` to `GET /api/logs`. Both requests
need `since`.

### Read the attribute catalog

This request finds numeric paths that contain `status` in one project:

```bash theme={null}
curl --get "https://api.logbrew.co/api/logs/attributes" \
  --header "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "project_id=<project-uuid>" \
  --data-urlencode "since=2026-06-01T00:00:00Z" \
  --data-urlencode "type=number" \
  --data-urlencode "search=status" \
  --data-urlencode "limit=2"
```

The response is an object, not a bare array. This synthetic example has 2
attributes and another page:

```json theme={null}
{
  "attributes": [
    { "path": "/http/status_code", "type": "number", "observed_count": 50, "last_seen_at": "2026-06-01T12:00:03.789Z" },
    { "path": "/response/status", "type": "number", "observed_count": 42, "last_seen_at": "2026-06-01T12:00:02.456Z" }
  ],
  "coverage": {
    "total_logs": 60,
    "fully_indexed_logs": 50,
    "partially_indexed_logs": 2,
    "unindexed_logs": 8
  },
  "next_cursor": { "observed_count": 42, "path": "/response/status", "type": "number" }
}
```

`type` is `string`, `number`, or `boolean`. `observed_count` is the number of
logs in the range that have that path and type. `last_seen_at` is the time of
the latest one. One log can have many paths. Do not add the counts to get a
number of logs.

`coverage` tells you which logs an attribute filter can search:

| Field | Meaning |
| - | - |
| `total_logs` | Logs that match the catalog's project, time, severity, service, release, and environment filters. |
| `fully_indexed_logs` | Logs with all supported attribute values searchable. |
| `partially_indexed_logs` | Logs with some values left out of the index. A filter can miss a value that was left out. |
| `unindexed_logs` | Logs that typed attribute filters cannot search. |

The 3 groups add up to `total_logs`. The catalog `type`, `search`, and cursor
do not change the coverage. An empty `attributes` list does not mean that
`total_logs` is zero.

The catalog has no `status` key. Its severity filter compares the captured
severity, not the effective severity.

`search` is a path substring of 1 to 128 bytes without control characters.
`limit` sets the number of attributes on a page.

### Continue the catalog

The catalog does not use `pagination=cursor`. Repeat every filter, and copy
all 3 fields from `next_cursor`:

| Returned field | Next request key |
| - | - |
| `next_cursor.observed_count` | `cursor_count` |
| `next_cursor.path` | `cursor_path` |
| `next_cursor.type` | `cursor_type` |

Stop when `next_cursor` is `null`.

### Apply a typed filter

Copy the path and type from the catalog. Paths use JSON Pointer syntax, not
dotted keys. Keep any `~0` or `~1` escape in the path unchanged.

This request reads logs whose numeric response status is 500 or more:

```bash theme={null}
curl --get "https://api.logbrew.co/api/logs" \
  --header "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "project_id=<project-uuid>" \
  --data-urlencode "since=2026-06-01T00:00:00Z" \
  --data-urlencode 'attribute_filters=[{"path":"/response/status","type":"number","operator":"gte","value":500}]'
```

`attribute_filters` is a JSON array of 1 to 4 filters. A log must match every
filter. Each filter has `path`, `type`, `operator`, and `value`. The JSON type
of `value` must match `type`: the number `500` is not the string `"500"`.

| `type` | `operator` values |
| - | - |
| `string` | `eq`, `ne`, `contains`, `starts_with` |
| `number` | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |
| `boolean` | `eq`, `ne` |

`ne` matches only logs that have the path. A log without the path does not
match `ne`. For `string`, `case_sensitive` is optional and defaults to
`false`. LogBrew rejects `"case_sensitive": true` for `number` and
`boolean`.

These limits apply:

* The JSON array is at most 4,096 bytes.
* A string value is at most 1,024 bytes.
* `contains` and `starts_with` need a non-empty string.
* A number must be finite and from -9,007,199,254,740,992 to
  9,007,199,254,740,992.

A log that the index cannot search does not match a filter. It can still
appear in a request without `attribute_filters`. For the log response, see
[Log response](https://docs.logbrew.co/reference/telemetry-response-shapes.md#log-response).

### Correct attribute errors

Each error below returns `422` with `validation_failed`:

| `error` | Fix |
| - | - |
| `log attribute queries require since` | Add `since` to the catalog request, or to a log request with `attribute_filters`. |
| `invalid log attribute filters` | Send a JSON array of 1 to 4 filters with a path, type, operator, and value from the catalog. |
| `invalid log attribute cursor` | Send `cursor_count`, `cursor_path`, and `cursor_type` together from `next_cursor`. |
| `invalid log attribute search` | Send a non-empty path substring of 128 bytes or fewer. |

Correct the request before you retry. Do not remove a filter, because that
changes the result.

## Cursor pagination

Cursor mode is opt-in. Without it, list routes return a bare array. Send
`pagination=cursor` without cursor fields for the first page. For each next
page, repeat every filter and send the complete cursor field set:

| Route | Continuation cursor fields |
| - | - |
| Logs, issues, issue occurrences, actions, metrics, and deployments | `cursor_time` and `cursor_id` |
| Releases | `cursor_time`, `cursor_project_id`, `cursor_release`, `cursor_environment`, and `cursor_service_name` |
| Trace discovery | `cursor_time` and `cursor_trace_id` |

Map the returned `next_cursor` fields to the next request:

* `next_cursor.time` goes to `cursor_time`.
* `next_cursor.id` goes to `cursor_id`.
* For traces, `next_cursor.trace_id` goes to `cursor_trace_id`.
* For releases, add `cursor_` before each returned field name, for example
  `next_cursor.release` goes to `cursor_release`.

Stop when `next_cursor` is `null`. Do not calculate a cursor from the last row.
The release cursor does not change the selected projects. Keep the original
`project_id` or `project_ids`.

```bash theme={null}
curl --get "https://api.logbrew.co/api/logs" \
  --header "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "project_id=<project-uuid>" \
  --data-urlencode "severity=error" \
  --data-urlencode "since=2026-06-01T00:00:00Z" \
  --data-urlencode "pagination=cursor" \
  --data-urlencode "limit=50"
```

`limit` sets the page size. A page can contain fewer rows. These routes do
not accept `page` or `page_number`.

| Route | Default `limit` | Maximum `limit` |
| - | -: | -: |
| Logs, log attributes, issues, actions, metrics, releases, and trace discovery | 100 | 500 |
| Issue occurrences | 25 | 100 |
| Deployments | 50 | 100 |

On most routes, LogBrew changes a `limit` above the maximum to the maximum.
The deployment list rejects a `limit` outside 1 to 100 with `422`. The
deployment list always returns a page object with `next_cursor`, also without
`pagination=cursor`.

LogBrew rejects these requests with `422` and `validation_failed`:

* A `pagination` value other than `cursor`.
* Cursor fields without `pagination=cursor`.
* An incomplete cursor field set.
* A `cursor_time` that is not an RFC3339 timestamp.

A cursor marks a position; it does not freeze the data. Start a new first page
when you need a fresh view.

The CLI uses the same fields:

```bash theme={null}
logbrew read logs --severity error --pagination cursor --limit 50 --json
logbrew read logs --severity error --pagination cursor --limit 50 \
  --cursor-time <time> --cursor-id <id> --json
```

## Diagnose an empty result

An empty list means that no row matched every filter. It says nothing about
other signals. Check the request in this order:

1. Confirm the project ID.
2. Remove optional filters one at a time.
3. Widen `since` if the expected event is older. Remove `until` or move it
   later if the expected event is newer.
4. Compare `service_name`, `release`, and `environment` with the values that
   your SDK sends.
5. For logs, add `status=all` if a log rule can hide the expected log.
6. Confirm that the route accepts each filter.

## Recover from a rejected query

A rejected query returns the standard error envelope. An unknown key or a
value of the wrong type returns `422`:

```json theme={null}
{
  "error": "invalid query parameters",
  "code": "validation_failed",
  "next": "check query parameter names and value types, then retry",
  "next_action": {
    "code": "fix_request",
    "target": "request"
  }
}
```

Common fixes:

* Replace a friendly alias with the key from the [filter matrix](#filter-matrix).
* Send every continuation cursor field that the route needs.
* Remove cursor fields from the first page request.
* Use only one project selector.
* Replace an unsupported severity or trace status with a canonical value.

For error codes and recovery, see [API errors](https://docs.logbrew.co/reference/api-errors.md). For
response bodies, see [Telemetry response shapes](https://docs.logbrew.co/reference/telemetry-response-shapes.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.