Pagination
Overview
Section titled “Overview”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.
Example request
Section titled “Example request”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 }}'Response format
Section titled “Response format”In responses, number, size, and total are returned as strings.
{ "result": [], "page": { "number": "1", "size": "10", "total": "42", "cursor": null, "has_next": true }}Pagination parameters
Section titled “Pagination parameters”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 calculation
Section titled “Offset calculation”offset = (number - 1) * sizeExample: number = 3 and size = 10 produce offset = 20, returning items 21 through 30.
Cursor pagination
Section titled “Cursor pagination”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" }}Example pages
Section titled “Example pages”{ "number": "1", "size": "10", "total": "42", "cursor": null, "has_next": true}{ "number": "2", "size": "10", "total": "42", "cursor": null, "has_next": true}{ "number": "5", "size": "10", "total": "42", "cursor": null, "has_next": false}