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

> ## Agent Instructions
> The docs are served at https://docs.devias.io. Every path in these docs is relative to that root: /llms.txt is https://docs.devias.io/llms.txt.
> Devias is an open-source platform that works as an operating system for a business: a core (records, views, workflows, agents, permissions) with installable modules.
> Pages are typed by folder. concepts/ explains what things are, guides/ gives procedures, reference/ is exhaustive (SDK, CLI, HTTP API), operate/ covers hosting. Use /start/glossary for exact terms.
> Every id in a module (module, object, field, view, action, workflow, step, connection, variable, event, policy) is a uuid. Generate them with `devias id <count>`. Never invent dotted or readable ids.
> Run `devias plan` and read its output before `devias apply`. Apply only what the plan says.
> The OpenAPI document, including the routes of the modules in the reference setup, is at /reference/api/openapi.json.
> Devias is young and changes quickly. If a page and the source repository (github.com/devias-io/devias) disagree, the repository is right.

# Querying records

> The JSON query format for listing records through the Devias API: object, select, filter, sort, limit (default 50, up to 200), cursor, search, include and count. Lists every filter operator, how and, or and not combine conditions, and how nextCursor paging works.

Listing records takes a **query**, which is the same JSON the SDK's query builder produces.

```json theme={"dark"}
{
  "object": "person",
  "select": ["first_name", "company"],
  "filter": {
    "and": [
      { "field": "stage", "op": "eq", "value": "customer" },
      { "field": "email", "op": "is_not_empty" }
    ]
  },
  "sort": [{ "field": "first_name", "direction": "asc" }],
  "limit": 50
}
```

| Property | What it does |
| - | - |
| `object` | The object's API name. |
| `select` | Return only these fields. |
| `filter` | Keep only records that match. |
| `sort` | Order the results. |
| `limit`, `cursor` | Page size (up to 200, default 50) and where to continue. |
| `search` | Match free text across the searchable fields. |
| `include` | Also return the records a relation points at. |
| `count` | Also return the total number of matches, up to a cap. |

## Filters

A filter is a condition, `{ "field", "op", "value" }`, or a group of conditions combined with `and`, `or` or `not`. The operators (`op`) are `eq`, `neq`, `in`, `not_in`, `lt`, `lte`, `gt`, `gte`, `between`, `contains`, `starts_with`, `is_empty`, `is_not_empty`, `any_of` and `all_of`.

## Pages

A response holds the records and a cursor:

```json theme={"dark"}
{ "items": [], "nextCursor": "abc123" }
```

While `nextCursor` is not `null`, send it back as `cursor` to get the next page. Stop when it is `null`. A cursor is opaque: it must not be built or changed by the client.

## Related

* [SDK records and queries](https://docs.devias.io/reference/sdk/records-and-queries.md): build the same query in TypeScript.
* [API errors](https://docs.devias.io/reference/api/errors.md): what a bad query returns.
* [Data model](https://docs.devias.io/concepts/data-model.md#built-in-field-types): which field types can be sorted, grouped and searched.


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