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

# Pagination

> The shared list contract: search, paging, sorting, and the envelope.

Every list endpoint shares one contract.

## Query parameters

| Parameter | Type    | Behavior                                           |
| --------- | ------- | -------------------------------------------------- |
| `q`       | string  | Case-insensitive contains search, where supported. |
| `page`    | integer | Page number, 1-based.                              |
| `limit`   | integer | Items per page. 1 to 100, default 20.              |
| `sort`    | enum    | `createdAt` or `updatedAt`. Default `createdAt`.   |
| `order`   | enum    | `asc` or `desc`. Default `desc`.                   |

Some lists add filters of their own. Examples: `?status=` on reports, and
`?scanId=` on agent sessions. The endpoint pages in the API reference name
the extras.

## Envelope

List endpoints return one shape:

```json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
{
  "items": [],
  "total": 128,
  "page": 1,
  "limit": 20,
  "totalPages": 7
}
```

* `items` — the rows for this page.
* `total` — the row count for the whole filter, not the page.
* `totalPages` — `ceil(total / limit)`.

Send `page` until `page` equals `totalPages`. Aquila scopes every list to your user. You never see another account's rows.
