Filtering
The awork API supports a huge set of filters that can be executed on the majority 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: filterby=name eq 'awork %26 co'
Incorrect: filterby=name eq 'awork & co'
If you want to filter by a nested property, you can do this by separating the Properties by /
.
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 )
.
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'