Filtering
The Awork API supports a wide range of filters that can be applied to most of our API endpoints.
A filter can be applied by adding a filterby
expression to the request URL:
Important: Special characters (like ?
, &
and =
) within a string filter value need to be properly URL encoded.
Correct:
Incorrect:
If you want to filter by a nested property, you can do this by separating the properties by /
, for example:
Logical Operations
You can invert the expression by using not
before the statement
Furthermore, you can combine expressions using the logical operator and
as well as the logical operator or
Precedence is defined with (
and )
.
You can also use the any
operator in combination with eq false
to filter for items that do not contain a specific value.
Data Types
The data types DateTime and Guid have to be prefixed with the corresponding type identifier datetime
and guid
, respectively, e.g.
/users?filterby=birthDate ge datetime'2018-04-03T00:00'
/users?filterby=id eq guid'12345678-aaaa-bbbb-cccc-ddddeeeeffff'