Filtering
Collection APIs support filtering. You can use Field Names for each collection's response to create filtering criteria as a query parameter.
Format: $filter={fieldname} <operator> {value}
fieldnameis case-insensitive.valueis case-insensitive.
Operators
| Description | Operator | Example |
|---|---|---|
| Strings | ||
| Contains | ct | fieldname ct 'partial' |
| Not contains | nct | fieldname nct 'partial' |
| Equals | eq | fieldname eq 'fullValue' |
| Not equals | ne | fieldname ne 'fullName' |
| Starts with | sw | fieldname sw 'Start' |
| Ends with | ew | fieldname ew 'end.' |
| Numeric / Date | ||
| Greater than | gt | datefield gt '2025-02-10' |
| Greater than or equal to | ge | Numberfield ge 100 |
| Less than | lt | Numberfield lt 10000 |
| Less than or equal to | le | Numberfield le 10 |
| Boolean | ||
| True | eq | fieldName eq 'true' |
| False | eq | fieldName eq 'false' |
You can combine multiple field names using conjunctions 'and' or 'or'.
fieldName1 ct 'abc' or fieldName2 ct 'xyz'fieldName1 ct 'abc' and fieldName2 ct 'xyz'
When using more than one criterion for a single field, you have the option to use parenthesis to support your filtering logic.
(fieldName1 sw 'abc' and fieldName1 ew 'xyz')
Supply conjunctions 'and' or 'or' when using multiple criteria for multiple fields.
(fieldName1 sw 'abc' or fieldName1 sw '123') and (fieldName2 ct '3114' or fieldName2 ct '123')
To filter based on nullity, 'ct' and 'nct'can be used.
(fieldName1 nct '')retrieves values that are null(fieldName1 ct '')retrieves values that are not null
If an invalid filter is provided, an error will be returned. If the filter is valid but targets an invalid column, the results will be empty.
Updated 2 months ago
What’s Next
