Skip to main content
Version: 2.0

Pagination

Some endpoints that return a list of items use pagination to ensure fast response times for all API clients. Below is an example of how pagination is used when listing all holders in the access control system.

Request

Paginated requests can be customized using the page and per_page query string parameters.

GET https://systems.pdk.io/{{system_id}}/holders?page=3&per_page=10 HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system id.
pageQueryIntegerNoThe zero-based page number. The default value is 0.
per_pageQueryIntegerNoThe number of items per page. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

Paginated responses will include the Link and X-Total-Count headers.

HTTP/1.1 200 OK
Content-Type: application/json
Link: <https://systems.pdk.io/{{system_id}}/holders?per_page=20>; rel="first", <https://systems.pdk.io/{{system_id}}/holders?page=2&per_page=20>; rel="prev", <https://systems.pdk.io/{{system_id}}/holders?page=4&per_page=20>; rel="next", <https://systems.pdk.io/{{system_id}}/holders?page=10&per_page=20>; rel="last"
X-Total-Count: 123

...
HeaderDescription
LinkA comma-delimited list of first, prev, next, and last links.
X-Total-CountThe total number of items.