API reference
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.
To walk through every page, follow the next link until a response comes without one. A page past the last one returns an empty data list, with self, first and last links.
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
%5Bfor[and%5Dfor], 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
-goption) 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