RESTful API Pagination Example
Some organizations have inventories with thousands of APs. This can be challenging when you
want to view them all with an API GET request because by default, the response will be
returned without pagination on a single page. You can enable pagination to the returned data
by adding HTTP header parameters for X-Page-Limit
and
X-Page-Page
to the API GET request.
The X-Page-Limit
defines the maximum number of results per page while the
X-Page-Page
defines the maximum number of page results. The example below
shows the format of a GET request that includes pagination:
Request URL: https://api.mist.com/api/v1/orgs/:org_id/inventory Request Method: GET Status Code: 200 OK Date: Thu, 16 May 2019 04:22:05 GMT Request Headers: X-Page-Limit: 1000 X-Page-Page: 35
The response you receive from Mist when making the request in the Django web interface, will look like this:
![](../../images/s053686.png)
Refer to our API document for more information on usage: https://api.mist.com/api/v1/docs/Overview#query (Juniper Mist login required)