> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Pagination and filtering

Pagination is **not uniform** across the API — each group paginates the way that fits its data. Filtering and sorting is richest on data objects. This page covers both.

## Pagination by group

#### Files

`?limit` (default 50, max 200). **No cursor** — you get a single most-recent page.

```bash
curl "https://api.cloudraker.com/spaces/{spaceId}/files?limit=50" \
  -H "Authorization: Bearer $RAKERONE_API_KEY"
```

#### Objects

`?limit` (1–200, default 50) + `?offset` (default 0). The response is `{ objects, nextOffset }`, where `nextOffset` is `null` when the list is exhausted.

```bash
curl "https://api.cloudraker.com/spaces/{spaceId}/objects/{definitionId}?limit=50&offset=0" \
  -H "Authorization: Bearer $RAKERONE_API_KEY"
```

#### Playbook runs

`?limit` (1–100) + `?starting_after` (a cursor).

```bash
curl "https://api.cloudraker.com/spaces/{spaceId}/playbook-runs?limit=25&starting_after=<runId>" \
  -H "Authorization: Bearer $RAKERONE_API_KEY"
```

## Filtering data objects

`GET /spaces/{spaceId}/objects/{definitionId}` accepts three query parameters that shape the result set:

* **`filter`** — a JSON array of entries `{ fieldKey, subField?, operand, value }`.
* **`sort`** — a JSON array of `{ fieldKey, direction }` where `direction` is `"asc"` or `"desc"`. Default sort is `createdAt` descending.
* **`view`** — a saved-view id whose stored filters and sorts apply instead. **Mutually exclusive** with `filter`/`sort` (using both → `400 invalid_request`). An unknown or wrong-scope view → `404 view_not_found`.

`subField` targets a nested field of a composite (for example a `city` inside an address).

An unknown or archived field, or a `$`-injection attempt, in `filter`/`sort` returns `422`.

### Operands

There are 14 filter operands:

| Operand            | Meaning                      |
| ------------------ | ---------------------------- |
| `is`               | Equals                       |
| `is_not`           | Not equal                    |
| `is_empty`         | Field has no value           |
| `is_not_empty`     | Field has a value            |
| `contains`         | Substring match              |
| `does_not_contain` | Negated substring match      |
| `gt`               | Greater than                 |
| `gte`              | Greater than or equal        |
| `lt`               | Less than                    |
| `lte`              | Less than or equal           |
| `is_before`        | Date before                  |
| `is_after`         | Date after                   |
| `is_any_of`        | Value in a list              |
| `includes`         | List field includes value(s) |

### Example

Filter to unpaid Acme invoices, newest first:

```bash
curl -G "https://api.cloudraker.com/spaces/{spaceId}/objects/{definitionId}" \
  -H "Authorization: Bearer $RAKERONE_API_KEY" \
  --data-urlencode 'filter=[{"fieldKey":"vendor","operand":"is","value":"Acme"},{"fieldKey":"status","operand":"is_not","value":"paid"}]' \
  --data-urlencode 'sort=[{"fieldKey":"invoiceDate","direction":"desc"}]'
```

### Returned objects

Each object in the response carries its inline `data` and `fieldMeta`, plus, when present:

* **`provenance`** / **`review`** — for AI-imported values (source citations and approval state).
* **`origin`** — `{ actionRunId?, playbookRunId? }` for values produced by an action or playbook run.

## Where to go next

#### [Errors](/developers/errors)

Status codes and error codes across the API.

#### [API reference](/api/overview)

Full request and response schemas for every list endpoint.