Developers
Query language
Filter, sort, select and page entities with $impl, $where, $order, $select, $skip and $take.
The query language filters, sorts, selects and pages entities. It's used by GET /api/entities, by view filters, by
dashboard data sources, by plugins' and workflow nodes' queries, and (with the same operators) by workflow conditions.
GET /api/entities?$impl=Customer&$where=creditLimit > 1000 & city = 'Leeds'&$order=-creditLimit&$select=firstName,email&$take=20Parameters
| Parameter | Meaning | Example |
|---|---|---|
$impl | Perspectives the entity must have: a comma means all of, | means any of. Names or ids. | $impl=Contact,Customer|Supplier (Contact and (Customer or Supplier)) |
$where | A filter (below). Repeat it to AND several. | $where=city='Leeds' & creditLimit>1000 |
$order | Sort keys: field, field asc, field desc or -field, comma-separated. | $order=-creditLimit,lastName |
$select | Fields to return. _id and _version always are; missing fields are null; * for all. _created, _modified and _interfaces can be selected. | $select=firstName,email,_interfaces |
$skip, $take | Paging, after filtering and sorting. $take is capped by the server's MaxPageSize. | $skip=20&$take=20 |
Values must be URL-encoded. A literal & inside $where may be sent encoded (%26) or raw: anything that doesn't
start a known $ parameter is joined back onto the $where before it. Unknown parameters are a 400, so typos are
caught.
The filter
expression := and ( '|' and )* -- OR, lowest precedence
and := term ( '&' term )* -- AND
term := '(' expression ')' | comparison
comparison := field op value
op := = != < > <= >= ~= (also accepted: == <>)
value := 'quoted' | "quoted" | bare-word | number | date | true | false | null- Fields are system names, or the metadata fields
_id,_version,_createdand_modified. - Values are converted to the field's type when the query is parsed, so a wrong type is a 400 rather than an empty result.
- To put a quote in a quoted string, double it:
'O''Brien'. In a URL+means a space, so send a plus sign as%2B. - Text comparisons ignore case.
~=(contains) matches Text containing the value, ignoring case:lastName ~= 'smi'. It works on Text fields only, a missing value fails it, and it never uses an index.- Missing values:
field = nullmatches entities without the field, andfield != nullthose with it. A missing value fails=,<,>,<=and>=, and passes!=. - Limits: expressions up to 4,096 characters, and parentheses up to 32 deep.
- Errors give the parameter and position:
'lots' is not a valid Decimal value for 'creditLimit' (at position 15).
Examples
| Filter | Finds |
|---|---|
creditLimit >= 1000 & creditLimit < 5000 | A range. |
city = 'Leeds' | city = 'York' | Either city. |
(status = 'open' | status = 'held') & total > 100 | Grouping. |
email = null | Entities without an email. |
lastName ~= 'smi' | Smith, Smithers, Naismith. |
_modified >= 2026-11-01 | Changed since 1 November (UTC). |
manager = '1e5a…' | Staff with a given manager. |
Sorting
Values sort by type: numbers numerically, dates by instant, and text by code point ignoring case. Entities without a value sort last in both directions. Ties are broken by entity id, so paging is stable.
Indexes
Field indexes make filters and sorts fast. =, <, >, <= and >= become
range scans; & intersects and | unions. Every candidate is re-checked against the whole filter, so a query returns
exactly the same results with or without indexes. When the first sort key is indexed, results stream from the index in
order, and only the requested page is loaded.
Explain
GET /api/entities/explain takes the same parameters and returns the plan without running the query:
{
"totalEntities": 50000,
"candidates": 11,
"interfaceIndexUsed": true,
"fieldIndexesUsed": ["creditLimit"],
"fullScan": false,
"filter": ["creditLimit >= 2900 & city = 'Leeds'"],
"order": "creditLimit desc",
"orderIndexUsed": "creditLimit"
}candidates is how many entities will be loaded and checked against the full filter.
Security
Filtering, sorting or selecting on a field the caller can't read is a 403, so a filter can't be used to probe hidden values.