Introduction:
Prior to 0.15.0, Boundary would return all items in a list. In 0.15.0, Pagination has been added to Boundary. With the new pagination feature, the default page size is now set to 1000 if no parameters are set in the controller configuration
Solution:
- Administrators can configure a page_size which overrides the default page size of 1000. All list endpoints now support pagination, except for worker resources. You can request a list of updated and deleted resources relative to the last result you received via the API.
curl -H "Authorization: Bearer $(boundary config get-token -keyring-type keychain -token-name default)" -H "Content-Type: application/json" 'http://127.0.0.1:9200/v1/targets?scope_id=p_123456xxxx&page_size=1&list_token=GnJQNupN6hbxxxxxNJ5ibpK8MUdYPtdpTBnAeKpCXxfxxxxxxJe51LCz' | jq
- max_page_size can also be set to restrict the maximum size of the page a user can request. This can be set in the controller config.