Most collection API endpoints support filtering, which makes it possible to retrieve a subset of resources by applying conditions on their state. For example, you can only retrieve leave objects whose status is tentative.Filtering is commonly handled through query parameters: /lucca-api/leaves?status=tentative.Some query parameters support lists, in which case the server expects a comma-separated list of values: ?status=tentative,confirmed.As of now, only strict equality or unequality filters are supported outside of dates, date-times and date-time-offsets. Filters are most often named with the corresponding property. In case of unequality filters, then the property name is prefixed with the ”-” character.
Copy
Ask AI
# Retrieve all leaves with status "tentative"GET /lucca-api/leaves?status=tentative HTTPS/2
You can only filter on a subset of the object properties.Filtering is implemented on an opt-in basis: each endpoint only supports filtering on a preset of properties. If you feel like a filter is missing, please contact us.
GET /lucca-api/leaves?startsOn=2024-01-01 HTTPS/2Host: example.ilucca.netApi-Version: {API_VERSION}Authorization: Bearer {ACCESS_TOKEN}Accept: application/jsonAccept-Encoding: gzip, br
Please note that open-handed ranges are supported through the ”..” characters: ?createdAt=..--2023-01-01T20:00:00Z (all leaves created before Jan. 1st 2023 at 08:00 PM UTC).More examples:
2024-01-01--2024-12-31: from Jan. 1st 2024 until Dec. 31st 2024 (included).