Pagination

All endpoints which return a list of API resources support pagination. The Northpass API utilizes an offset-based pagination via the page and limit parameters. To fetch a paginated response you can simply pass those two parameters in a query string, e.g.:

curl --request GET \
  --url 'https://api.northpass.com/v2/courses?page=2&limit=50' \
  --header 'Accept: application/json' \
  --header 'X-Api-Key: <INSERT_API_KEY_HERE>'

Pagination links appear in the links part of the response, as described by the JSON API standard. Pagination keys will be omitted to indicate that a particular link is unavailable.

Here’s an example of the pagination links included in the JSON response:

{
  "links": {
    "self": "https://api.northpass.com/v2/courses?page=2",
    "prev": "https://api.northpass.com/v2/courses",
    "next": "https://api.northpass.com/v2/courses?page=3"
  }
}