Skip to content

Pagination

DANGER

This document has not been updated since version 0.0.3 and is not ready for production. It will be updated before version 1.0 of the project is released.

When an API response provides a list of objects, regardless of the quantity, pagination is supported. In paginated responses, objects are nested under a list attribute. The response includes request attributes such as page_size, page_index, search, and filters for specifying record requests.

Request

sh
GET /v1/account/users
?page_index=2&page_size=25&filters[active]=1&filters[foo]=bar
ParameterTypeDescription
page_sizeOptional integerThe quantity of records you want returned. (The default is 25.)
page_indexRequired integerThe current page index in the array of pages available.
searchOptional stringThe value to search for against the searchable data for the specific list.
filtersOptional arrayAn array of filters you want to process against the request. (Each object list provides an array of filters available.)

Response

js
{
  "list": [
    {
      "id": "usr_1234567890",
      ...
    },
    {
      "id": "usr_2345678901",
      ...
    }
    ...
  ],
  "total": 8,
  "url": "https://api.backstack.com/v1/account/users?page...",
  "filters": [
    "status": {
      "active": "Active",
      ...
    },
    ...
  ]
}