Share via

Pagination related quries for Purview API

Balamurugan, Susinthika 20 Reputation points
2026-03-10T13:17:28.61+00:00

Hello Team,

I am trying to understand the pagination behavior mentioned in the Microsoft Purview API documentation. As per the documentation, the pagination keys skipToken and nextLink are expected to be present in the response when retrieving paginated results.

However, after enabling the setup and invoking the endpoints, I am currently not seeing these keys in the API responses.

Could you please help clarify the following:

  • Are there any specific configurations or parameters that need to be enabled in order to receive the skipToken or nextLink fields in the response?

Or are these fields returned only when the result set exceeds the default page size?

For reference, I am testing the following endpoints:

List Data Sources https://learn.microsoft.com/en-us/rest/api/purview/scanningdataplane/data-sources/list?view=rest-purview-scanningdataplane-2023-09-01&tabs=HTTP

List Scans by Data Source https://learn.microsoft.com/en-us/rest/api/purview/scanningdataplane/scans/list-by-data-source?view=rest-purview-scanningdataplane-2023-09-01&tabs=HTTP

List Scan History https://learn.microsoft.com/en-us/rest/api/purview/scanningdataplane/scan-result/list-scan-history?view=rest-purview-scanningdataplane-2023-09-01&tabs=HTTP

List Policies https://learn.microsoft.com/en-us/rest/api/purview/purview-unified-catalog/policies/list?view=rest-purview-purview-unified-catalog-2025-09-15-preview&tabs=HTTP

Any clarification on how pagination works for these APIs would be greatly appreciated.

Thank you in advance for your help.


Microsoft Security | Microsoft Purview
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Smaran Thoomu 33,920 Reputation points Microsoft External Staff Moderator
    2026-03-11T09:01:05.32+00:00

    Hi @Balamurugan, Susinthika
    Thanks for your question.

    In Microsoft Purview APIs, pagination fields like skipToken or nextLink are returned only when the response contains more items than can be returned in a single page. If the total number of results is small, the API will return all data in one response, and you will not see these pagination fields.

    There is no specific configuration or setting that needs to be enabled to get these fields. Pagination is handled automatically by the service.

    Regarding the default page size, this is not always fixed or publicly documented for all Purview endpoints, and it may vary depending on the API and service behavior. Because of this, it is generally recommended to rely on the presence of nextLink / skipToken in the response rather than assuming a specific page size.

    If you would like to test pagination behavior, you can try:

    • Using query parameters such as $top (if supported by that endpoint)
    • Testing in an environment with a larger number of items

    If you are still not seeing pagination when you expect large results, please share a sample request and response (sanitized), and we can review further.

    Hope this helps clarify.

    Thanks.


  2. Q&A Assist
    2026-03-10T13:17:52.4666667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For the Microsoft Purview REST APIs, pagination fields are only returned when the service actually needs to paginate the result set. There is no separate configuration switch to “turn on” skipToken or nextLink.

    Key points based on the documented patterns:

    1. Pagination is conditional on result size
      For list-style APIs, pagination metadata is emitted only when the response cannot return all items in a single page:
      • If the total number of items is less than or equal to the default page size, the response is returned as a single page and no pagination token/next link is included.
      • When the result set exceeds the default page size, the service returns a pagination mechanism (for example, a nextLink or token) that the client must follow to retrieve subsequent pages.
      This is consistent with other Microsoft services:
      • Microsoft Graph list APIs return an @odata.nextLink only when there are more pages to fetch and may use $skip or cursor-based tokens depending on the resource.
      • Learn Platform APIs use a nextLink field only when there is another page of results to retrieve.
      • Some OData-based services use $skiptoken for server-driven paging; the token appears only when the server decides to paginate.
    2. Token/nextLink is opaque and request-driven
      When pagination is triggered, the service returns:
      • A cursor/URL (for example, nextLink) that already encodes the necessary state (such as a token or skip value).
      • Clients should not construct these tokens manually; instead, they should:
        1. Inspect the response for nextLink (or equivalent).
        2. If present, call that URL as-is to get the next page.
        3. Repeat until no nextLink is returned.
    3. Purview Data Map APIs and pagination
      The Purview Data Map APIs show the same pattern:
      • For large result sets (for example, glossaries, terms, categories, or assigned entities), the documentation explicitly recommends using limit and offset query parameters to page through data when a single call would be too large or may time out.
      • When the dataset is small enough, a single call returns all results and no additional pagination metadata is needed.
      • When the dataset is large, using limit/offset or related pagination parameters is required to avoid timeouts and to retrieve data page by page.
    4. Why skipToken/nextLink may not appear in current tests
      For the specific endpoints being tested (List Data Sources, List Scans by Data Source, List Scan History, List Policies):
      • If the environment currently has only a small number of data sources, scans, scan history entries, or policies, the responses will fit within the default page size.
      • In that case, the service returns a single page and does not include skipToken or nextLink, which matches the documented behavior of other Microsoft APIs that use server-driven paging.
    5. How to validate pagination behavior
      To observe pagination in practice:
      • Ensure the relevant collection is large enough (for example, many data sources, scans, or policies) so that the service must paginate.
      • Call the list endpoint without specifying a very large page size (or using the default).
      • Inspect the response for a pagination field (nextLink or similar).
      • Follow that link to retrieve subsequent pages until it is no longer present.

    In summary, no extra configuration is required. skipToken/nextLink (or equivalent pagination metadata) are returned only when the result set exceeds what the service returns in a single page, which is determined by the default or requested page size.


    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.