Skip to content
LIVOI

Pagination

The LIVOI API uses a page object for Dynamic Query. Standard pagination uses number and size. Setting cursor enables cursor pagination.

{
"page": {
"number": 1,
"size": 10,
"cursor": null
}
}

In requests, number and size are integers with a minimum value of 1. Dynamic Query currently requires size <= 1000.

Terminal window
curl https://api.livoi.de/api/v1/dynamic/query \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"query_model": "users",
"query_attributes": ["id", "email", "created_at"],
"page": {
"number": 1,
"size": 10
}
}'

In responses, number, size, and total are returned as strings.

{
"result": [],
"page": {
"number": "1",
"size": "10",
"total": "42",
"cursor": null,
"has_next": true
}
}

number
The current page of results. Page numbering starts at 1.

size
Maximum entries per page. Dynamic Query currently allows up to 1000 entries per page.

cursor
Optional cursor for cursor/keyset pagination. The cursor is included in both requests and responses.

total
Total number of matching entries. With cursor pagination, the current implementation does not calculate an actual total and returns total: "0".

{ "formula": "total_pages = ceil(total / size)" }

has_next

{ "formula": "number * size < total" }
offset = (number - 1) * size

Example: number = 3 and size = 10 produce offset = 20, returning items 21 through 30.

Cursor pagination is enabled when page.cursor is set. Use it with order_by, which defines a stable ordering for the next slice of results.

{
"query_model": "users",
"query_attributes": ["id", "email", "created_at"],
"order_by": ["created_at", "id"],
"page": {
"number": 1,
"size": 10,
"cursor": "2026-06-01T10:00:00Z"
}
}
{
"number": "1",
"size": "10",
"total": "42",
"cursor": null,
"has_next": true
}