Pagination in the ConductorOne API
When making LIST or SEARCH requests to the ConductorOne API, use the page_size and page_token parameters to navigate through the list of results.
Using page_size
Section titled “Using page_size”Include the page_size parameter to tell the API how many search or list results to show on each page.
page_sizeaccepts a number between 10 and 100.- If you enter a number smaller than 10, the system will return 10 results per page.
- If you enter a number larger than 100, the system will return 100 results per page.
- The default value is 25.
Using page_token
Section titled “Using page_token”If your query returns more results than will fit on one page of the size you specified with page_size, you’ll see a unique nextPageToken value in the response. Include this value with the page_token parameter in your next request to see the next page of results.
- You do not need to include
page_tokenin your initial request (you can omit it or leave it empty). - You must include it for each subsequent request to paginate through results.
Example: Navigating a Paginated List
Section titled “Example: Navigating a Paginated List”First Request
Section titled “First Request”curl --request GET \ --url 'https://example.conductor.one/api/v1/apps/sample/entitlements?page_size=50'First Response
Section titled “First Response”{ "list": [ { "appEntitlement": { // List of 50 app entitlements with their details. } } ], "nextPageToken": "samplepagetoken1"}Second Request
Section titled “Second Request”curl --request GET \ --url 'https://example.conductor.one/api/v1/apps/sample/entitlements?page_size=50&page_token=samplepagetoken1'📝 Note: For this
GETexample, thepage_sizeandpage_tokenare included in the query.
ForPOSTrequests, includepage_sizeandpage_tokenin the request body instead.
Second Response
Section titled “Second Response”{ "list": [ { "appEntitlement": { // List of 50 more app entitlements with their details. } } ], "nextPageToken": "samplepagetoken2"}Third Request
Section titled “Third Request”curl --request GET \ --url 'https://example.conductor.one/api/v1/apps/sample/entitlements?page_size=50&page_token=samplepagetoken2'Third Response
Section titled “Third Response”{ "list": [ { "appEntitlement": { // List of 26 more app entitlements with their details. } } ], "nextPageToken": ""}ℹ️ An empty
nextPageTokenin the response indicates that you’ve reached the end of the list.