Skip to content
Last updated

fields

Description

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.

Examples

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.

filter

Description

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.

Operators

Logical Operators

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.

SyntaxDescription
_andGroup multiple filters by "AND"
_orGroup multiple filters by "OR"

Filter Operators

SyntaxDescription
_eqEqual to
_neqNot equal to
_ltLess than
_lteLess than or equal to
_gtGreater than
_gteGreater than or equal to
_inMatches any of the values
_ninDoesn't match any of the values
_nullIs null
_nnullIs not null
_containsContains the substring
_icontainsContains the case-insensitive substring
_ncontainsDoesn't contain the substring
_starts_withStarts with
_istarts_withStarts with, case-insensitive
_nstarts_withDoesn't start with
_nistarts_withDoesn't start with, case-insensitive
_ends_withEnds with
_iends_withEnds with, case-insensitive
_nends_withDoesn't end with
_niends_withDoesn't end with, case-insensitive
_betweenIs between two values (inclusive)
_nbetweenIs not between two values (inclusive)
_emptyIs empty (null or falsy)
_nemptyIs not empty (null or falsy)

Examples

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"]}}

limit

Description

Set the maximum number of items that will be returned. The default limit is set to 100.

Examples

Get the first 200 events.

GET /items/events?limit=200

offset

Description

Skip the first n items in the response. Can be used for pagination.

Examples

Get events 101—200.

GET /items/events?offset=100

page

Description

An alternative to offset. Page is a way to set offset under the hood by calculating limit * page. Page is 1-indexed.

Examples

Get events 101-200.

GET /items/events?page=2

sort

Description

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.

Examples

Get courses in descending order by title.

GET /items/courses?sort=-title

Description

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.

Examples

Find all courses that mention data

GET /items/courses?search=data

meta

Description

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.

Examples

Get all courses with meta data

GET /items/courses?meta=*