Vault uses pagination to improve performance when retrieving objects.
The default page size is specified in the
PVAULT_SERVICE_DEFAULT_PAGE_SIZE environment variable. When you request a list of objects, you can use the
page-size parameter to set a different page size. However, the page size cannot exceed the value specified in the
PVAULT_SERVICE_MAX_PAGE_SIZE environment variable.
The response provides a
results array containing the object details and a
paging object with information about the page. For example:
sizeis the number of results returned.
remaining_countis the number of items that remain to be returned in subsequent pages.
- By default, the
remaining_countis 100,000 items even if there are more items that satisfy the query. When receiving a count of 100,000 items, you should not assume that there are exactly 100,000 items left, there may be more.
- Using the cursor, subsequent calls to paging eventually reach a
remaining_countvalue of less than 100,000 items. Then, the figure is accurate.
remaining_countlimit is configured by the
cursoris a reference to the next page. You use the cursor in a follow-up call like this:to obtain the next page.
The final page in a sequence of pages returns
remaining_count and no cursor. For example: