Concept
Filtering
It is possible to filter on the entities' properties, to only return results which fulfill the values specified.
Entities that support filtering will support either one or all of the types below.
Filter | Shorthand | Description |
---|---|---|
Equals (default) | eq | The property value is equal to the filter value. A complete match |
Not Equals | ne | The property value is not equal to the filter value. A complete match |
Less than | lt | The property value is less than the filter value |
Less than equals | lte | The property value is either less than or equal to the filter value |
Greater than | gt | The property value is greater than the filter value |
Greater than equals | gte | The property value is either greater than or equal to the filter value |
The ne
, lt
, lte
, gt
and gte
filters are applied at the end of the property name, like creationDateTime[gte]=2021-01-01
and creationDateTime[lte]=2021-12-01
. While the equal filter can be set, it is also inferred if nothing is present.
Example:
Getting a list of departments that has the name Relesys and was created before or on the 1st of December 2020.
GET /api/v1/departments?name=Relesys&creationDateTime[lte]=2020-12-01 HTTP/1.1
Host: api.relesysapp.net
Accept-type: application/json
Authorization: Bearer [Your token]
Please see the parameters which can be used to filter the results on the documentation for each endpoint.
More info
Filtering can be combined with pagination and sorting.