The fields parameter allows you to control which fields are returned in the response object. By specifying this parameter, you can include only the fields you need, reducing the size of the response. This parameter supports dot notation to request nested relational fields. You can also use a wildcard (*) to include all fields at a specific depth.
Please always try to query as less data as possible and avoid using the wildcard symbol.
To retrieve only title and only nested relational fields events.id and events.event_start_date, from courses response, you can use the following query:GET /items/courses?fields=title,events.id,events.event_start_date
Nested data have a limit of 100 items.
To retrieve nested mant-to-many relational fields contacts, from events response, you can use the following query:GET /items/events/{{id}}?fields=contacts.contacts_id.*
Many-to-many relational fields have a junction table in between. Therefore a two level nesting is necessary.
Used to search items that matches the filter's conditions. The filter param follows the Filter Rules spec, which includes additional information on logical operators (AND/OR) and nested relational filtering.
You can nest or group multiple rules using the _and or _or logical operators. Each logical operator holds an array of Filter Rules, allowing for more complex filtering.
| Syntax | Description |
|---|---|
_and | Group multiple filters by "AND" |
_or | Group multiple filters by "OR" |
| Syntax | Description |
|---|---|
_eq | Equal to |
_neq | Not equal to |
_lt | Less than |
_lte | Less than or equal to |
_gt | Greater than |
_gte | Greater than or equal to |
_in | Matches any of the values |
_nin | Doesn't match any of the values |
_null | Is null |
_nnull | Is not null |
_contains | Contains the substring |
_icontains | Contains the case-insensitive substring |
_ncontains | Doesn't contain the substring |
_starts_with | Starts with |
_istarts_with | Starts with, case-insensitive |
_nstarts_with | Doesn't start with |
_nistarts_with | Doesn't start with, case-insensitive |
_ends_with | Ends with |
_iends_with | Ends with, case-insensitive |
_nends_with | Doesn't end with |
_niends_with | Doesn't end with, case-insensitive |
_between | Is between two values (inclusive) |
_nbetween | Is not between two values (inclusive) |
_empty | Is empty (null or falsy) |
_nempty | Is not empty (null or falsy) |
Get events with event_start_date between 2024-11-01 and 2024-11-30
GET /items/events?filter={"event_start_date": { "_between": ["2024-11-01", "2024-11-30"]}}
Set the maximum number of items that will be returned. The default limit is set to 100.
Get the first 200 events.
GET /items/events?limit=200
Skip the first n items in the response. Can be used for pagination.
Get events 101—200.
GET /items/events?offset=100
An alternative to offset. Page is a way to set offset under the hood by calculating limit * page. Page is 1-indexed.
Get events 101-200.
GET /items/events?page=2
What field(s) to sort by. Sorting defaults to ascending, but a minus sign (-) can be used to reverse this to descending order. Fields are prioritized by the order in the parameter. The dot-notation has to be used when sorting with values of nested fields.
Get courses in descending order by title.
GET /items/courses?sort=-title
The search parameter allows you to perform a search on textual and numeric type fields within a collection. It's an easy way to search for an item without creating complex field filters – though it is far less optimized. It only searches the root item's fields, related item fields are not included.
Find all courses that mention data
GET /items/courses?search=data
Metadata allows you to retrieve some additional information about the items in the collection you're fetching. * can be used as a wildcard to retrieve all metadata.
total_count: Returns the total item count of the collection you're querying.filter_count: Returns the item count of the collection you're querying, taking the current filter/search parameters into account.
Get all courses with meta data
GET /items/courses?meta=*