- record queries:
filter - each source of a record search:
sources[].filter - figure queries over a record selection:
context.records.filter
op. The other members depend on the operator, and a member the operator does not take must be absent. Leave filter out to select every record of the type the caller can read. An empty object ({}) is refused.
Operators
On a list field,
eq matches when any item equals the value. ne matches when no item does. contains and not_contains work the same way.
Fields
field is a field’s name from GET /schema, never a display name. A field’s storage decides its kind; see Field types. Image fields cannot be filtered on. Five system fields are also available:
A field the caller cannot read is refused exactly as if it did not exist (
unknown_field). A filter never reveals whether a hidden field exists.
Values
A value’s JSON type must match its field. For a field with options, the value is an option value, never its label.
A value is never
null. To match a missing value, use is_empty. A string never stands in for a number or a boolean.
Empty cells
Every condition exceptis_empty is false on an empty cell. That includes ne and not_contains: {"op": "ne", "field": "stage", "value": "closed"} does not match a record with no stage.
not is different. It is true wherever the condition inside it is false, so it matches empty cells too:
closed, including records with no stage.
An empty in list or id_in list matches no record. An empty all or any is refused.
Limits
Errors
A filter the ontology cannot apply is refused with422. The body has a stable code, and a path that points at the member at fault:
