Skip to content

Pagination

When the list of entities returned by a request is paginated, a links key will be included on the JSON response body with links to the first, last, next, prev and self pages.

Pagination is controlled using the following parameters:

page[number]
What page to retrieve. Defaults to 1.
page[size]
Number of entries per page. Defaults to 25, minimum is 1, maximum is 100.

Using Square Brackets in Parameter Names

Pagination parameters use Query Parameter Families, which are sets of query parameters with a common base name. Although square brackets should be URL-encoded with %5B for [ and %5D for ], our servers will accept unencoded square brackets, which leads to increased URL legibility.

In the examples where we use curl, we switch off the URL globbing function (with a simple -g option) to let curl know that we're OK with using square brackets.

Example: Getting the 3rd page of the reports list, with 10 reports per page

curl -g https://rocketvalidator.com/api/v1/reports?page[number]=3&page[size]=10