-
Notifications
You must be signed in to change notification settings - Fork 3
Paged Result
Richard Thombs edited this page Jan 18, 2015
·
4 revisions
Typically when a Web API method returns a list of objects, the Web API will return a Paged Result, which divides the total response into smaller pages.
Such methods typically take two extra Query String parameters so that the caller can control which page of results the method should return:
Skip - The number of records to skip past. Default is 0.
Take - The number of records to return. Default varies and the maximum value is typically 500.
The response body will contain two properties:
Items - An array of the objects that make up this page of the data.
More - A boolean flag indicating whether there are further pages of data available.
Eg:
{
Items: [
{ ... Result 1 ... },
{ ... Result 2 ... },
],
More: true
}To move to the next page of data, increment Skip by Items.length. Eg:
Skip+=repsonse.Items.length;