FilterExpressions
FilterExpressions filter resource collections according to one or more criteria.
filter=<FilterProperty>(<FilterOperator>(<FilterValue>))[,FilterExpressions]
FilterProperties
FilterProperties are properties used to perform a filter operation. For example, given the /folders resource below, the available FilterProperties are id, createdAt, ownerId, and name.
{
"folders": [
{
"id": 0,
"createdAt": "string",
"ownerId": "string",
"name": "string"
}
],
"pageData": { ... }
}
FilterExpressions containing one or more unknown FilterProperties result in a 400 Bad Request.
FilterOperators
FilterOperators determine the operation to apply when filtering results.
| Operator | Description | Example |
|---|---|---|
| , | and | filter=prop1(lte(10)), prop2(lte(10)) |
| between | between values | filter=prop(between(1,10)) |
| eq | equal to | filter=prop(eq(10)) |
| gt | greater than | filter=prop(gt(10)) |
| gte | greater than or equal to | filter=prop(gte(10)) |
| in | in array | filter=prop(in('a', 'b', 'c')) |
| isNull | is null | filter=prop(isNull()) |
| lt | less than | filter=prop(lt(100)) |
| lte | less than or equal to | filter=prop(lte(100)) |
| not | not | filter=prop(not(lte(100))) |
FilterValues
FilterValues are values used to perform a filter operation. A FilterValue can be of type string, number, boolean, ISODateString or a single dimension array of these types.
| Type | Example |
|---|---|
| string | 'string' |
| number | 10, -10, 0.10 |
| boolean | true, false |
| ISODateString | '2022-07-31T00:00:00.000Z' |
| array | 'foo','bar', 1,2,3, '2022-07-31T00:00:00.000Z', '2022-08-31T00:00:00.000Z' |