Getting Started
Pagination
Formatting responses
To ensure responses remain manageable and performant, all index (list) endpoints are paginated by default. Each response returns a limited set of records, along with metadata indicating how many total records and pages are available.
Pagination in Responses
All paginated endpoints return pagination metadata inside the meta.pagination
object.
Example
GET {base_url}/site_translations/1/posts
{
"meta": {
"pagination": {
"page": 1,
"per_page": 250,
"total_records": 276,
"total_pages": 2
}
},
"data": [
...
]
}
Response Fields
Key | Description |
---|---|
page | The current page number returned. |
per_page | Number of records included on this page. |
total_records | Total number of records available. |
total_pages | Total number of pages available. |
Pagination in Requests
Clients can control pagination by including page
and per_page
parameters in the query string.
Example
GET {base_url}/site_translations/15/posts?page=3&per_page=15
{
"meta": {
"pagination": {
"page": 3,
"per_page": 15,
"total_records": 50,
"total_pages": 4
}
},
"data": [
...
]
}
Request Parameters
Parameter | Description | Default | Constraints |
---|---|---|---|
page | The page number to return. | 1 | Must be greater than 0. |
per_page | Number of records per page. | 250 | Must be between 1–250. |
Notes
- If the total number of records exceeds the per_page limit, additional pages will be available.
- Always check the meta.pagination object to determine if more pages are available.