Limiting Response Results Using Pagination

The Oracle Linux Automation Manager REST API paginates responses for large collections such as those that may contain tens or hundreds of thousands of objects. This causes each web request to return only a limited number of results to prevent performance degradation.

For example, the following shows the response results of a collection:

{'count': 25, 'next': 'http://testserver/api/v2/some_resource?page=2', 'previous': None, 'results': [ ... ] }

To get the next page, request the page given by the 'next' sequential URL.

You can change the number of results returned for each request with the page_size query string parameter . The default maximum limit for the page_size parameter is 200 enforced for values that exceed it, such as ?page_size=1000. You can change this limit by setting the value in /etc/tower/conf.d/<some file>.py to something higher, for example MAX_PAGE_SIZE=1000.

Use the page query string parameter to retrieve a particular page of results.

http://<hostname or IP address>/api/v2/<multi_result_entity>?page_size=100&page=2

The previous and next links returned with the results sets these query string parameters automatically. Request page sizes beyond a two hundred may experience performance issues.