Azure DevOps REST API and Graph API: Pagination and Offset Support
0 reputation · 18 Jan 2021, 03:59 UTC
Dataset Retrieval and Pagination
When retrieving large datasets from Azure DevOps, the REST API typically employs server-side pagination. For many endpoints, this is managed via the x-ms-continuationtoken header, which allows clients to request subsequent pages by passing a continuationToken parameter.
Graph API Constraints
While standard OData-style parameters like $top are supported to limit result sets, the Azure DevOps Graph API exhibits specific behavior regarding offsets. Documentation indicates that $skip is not honored for most collection-based endpoints, often resulting in a 400 Bad Request error when attempted.
This creates a discrepancy for integrations that require random access to specific pages of a dataset rather than sequential traversal via continuation tokens. There is currently no documented mechanism within the Graph API to jump to a specific record offset without iterating through all preceding pages.
- Does the Graph API provide any alternative to
$skipfor non-sequential data access? - Is there a documented path for implementing offset-based pagination in the Graph API, or is continuation-token traversal the only supported method?