For the complete documentation index, see llms.txt. This page is also available as Markdown.

Constraints

Constraints filter GET results by the existence or contents of relations. Unlike Value Filters, they operate on relation-level conditions instead of comparing only one field value.

All constraints use the filter query parameter and can be combined with value filters.

Relation constraints and Value Filters can be combined in the same request.

Syntax

  • {route} - Endpoint from which records are retrieved.

  • ?filter - Query parameter containing the constraint.

  • [{constraint}] - Constraint key documented below.

  • [{field}] - Relation or relation field to which the constraint applies.

  • [{valueFilter}] - Optional Value Filter for related records.

  • {value} - Value required by the selected constraint or filter.

GET /api/{route}?filter[{constraint}][{field}][{valueFilter}]={value}

Does Not Have

The doesnt_have constraint returns records that do not have the specified relation.

Pass 1 when no additional field condition is required.

GET /api/{route}?filter[doesnt_have][{field}]={value}

Has

The has constraint returns records that have the specified relation.

Pass 1 when no additional field condition is required.

GET /api/{route}?filter[has][{field}]={value}

Where One of

The where_one_of constraint returns records that have at least one of the specified relations.

Pass the relations as a comma-separated list. Value Filters can add field conditions for the affected relations.

GET /api/{route}?filter[where_one_of][{fields}]={value}

Last updated