Paging

6/1/2011

This section provides instructions for how to retrieve complete result sets in an application when your queries return more than 100 results. DataMarket enforces a restriction on the maximum number of results returned per request. This means that any query issued sent to the service will return only 100 results at a time.

Result sets containing more than 100 results will have a link with rel=“next” and href attributes in the returned data. To retrieve the next 100 results in the dataset, you must follow the link. For example, if you periodically poll the Utilities collection of utilities to determine whether one or more utilities have been updated, you would send a request similar to the following to retrieve all utilities.

https://api.datamarket.azure.com/Microsoft/UtilityRateService/Utilities?$filter=IntendedUse eq 'Production'

This request will return only the first 100 utilities, even if there are more than 100 results.

If the returned result set contains a link element that has the rel=”next” attribute, you can retrieve the next set of 100 utilities by using the URI that is included in the href attribute.

<link rel="next" href=”https://api.datamarket.azure.com/Microsoft/UtilityRateService/Utilities?$filter=IntendedUse eq 'Production'&$skiptoken=guid'3034e9e5-d36c-45c9-9e29-daef86aff1d0’”/>

If no link element with the rel=”next” attribute exists, then the result set is considered complete.

See Also

Concepts

Using Data from Microsoft URS