filter query is encoded JSON to filter resources on list requests.
By default, filters are case-sensitive. Read about case-insensitive filtering.
Conditions
| Condition | Description | Example |
|---|---|---|
equals | Exact match comparison | { "name": { "equals": "example" } } |
not | Negates the specified condition | { "status": { "not": "inactive" } } |
in | Matches any value in the provided array | { "type": { "in": ["A", "B", "C"] } } |
notIn | Excludes any value in the provided array | { "category": { "notIn": ["spam", "trash"] } } |
lt | Less than comparison | { "age": { "lt": 18 } } |
lte | Less than or equal to comparison | { "price": { "lte": 100 } } |
gt | Greater than comparison | { "count": { "gt": 0 } } |
gte | Greater than or equal to comparison | { "score": { "gte": 75 } } |
contains | Checks if field contains the string | { "description": { "contains": "important" } } |
search | Full-text search in the field | { "content": { "search": "keyword" } } |
mode | Specifies search mode (default/insensitive) | { "name": { "equals": "test", "mode": "insensitive" } } |
startsWith | Checks if field starts with the string | { "title": { "startsWith": "The" } } |
endsWith | Checks if field ends with the string | { "email": { "endsWith": "@example.com" } } |
Operators
| Operator | Description | Example |
|---|---|---|
AND | Combines multiple conditions where all must be true | {"AND": [{"status": "active"}, {"age": {"gt": 18}}]} |
OR | Combines multiple conditions where at least one must be true | {"OR": [{"type": "admin"}, {"type": "moderator"}]} |
NOT | Negates a set of conditions | {"NOT": {"status": "deleted"}} |
Nullable
Usenull to read resources that have a property with a null value:
Nesting
Combine conditions and operators to create more complex filters:Relationships
Usesome, none, and every in combination with conditions and operators to filter resources based on related resources.
| Option | Description |
|---|---|
some | Matches if any related records meet the conditions |
none | Matches if no related records meet the conditions |
every | Matches if all related records meet the conditions |
Case-insensitive
Use themode option to perform case-insensitive filtering.