Skip to content

Advanced Filtering

The REST API supports basic filtering by status and locale. For complex queries, use the GraphQL endpoint.

GraphQL endpoint

POST /api/projects/{projectId}/graphql

Authentication is the same as the REST API — pass Authorization: Bearer YOUR_TOKEN.

Basic query

query {
posts {
data {
uuid
fields {
title
slug
created_at
}
}
total
current_page
last_page
}
}

Filter by field value

query {
posts(filter: { title: { contains: "jambo" } }) {
data {
uuid
fields { title }
}
}
}

Sort results

query {
posts(sort: [{ field: "created_at", direction: DESC }]) {
data {
uuid
fields { title }
}
}
}

Pagination

query {
posts(page: 2, perPage: 10) {
data {
uuid
fields { title }
}
total
current_page
last_page
}
}

Available filter operators

OperatorDescription
eqEqual to
neqNot equal to
containsString contains (case-insensitive)
startsWithString starts with
gt / gteGreater than / greater than or equal
lt / lteLess than / less than or equal
inValue is in array
isNullField is null

Fetch the schema

Terminal window
curl -X GET https://your-domain.com/api/{projectId}/graphql \
-H "Authorization: Bearer YOUR_API_TOKEN"

This returns the auto-generated GraphQL schema based on your collections.