Oracle CRM On Demand REST API Developer's Guide > Using the Oracle CRM On Demand REST API >

Paging Collection Resources


You can use paging URL parameters to limit large collection resource lists by breaking up lists into one or more pages of data. The Oracle CRM On Demand REST API supports paging for Oracle CRM On Demand top-level and child collection resources. For more information about Oracle CRM On Demand REST API supported top-level and child resources, see Oracle CRM On Demand REST API Supported Resources.

The following are optional request query parameters that you can specify to page through query results:

  • offset. Specifies how many results to skip for the first returned result. The default is 0.
  • limit. The maximum number of collection list items returned in a single request. The minimum value is 1, and the maximum value is 100. The default value is 100.

In the example below, the offset and limit parameters in the URL specify that the first 100 resources are returned in the query.

https://<host>/user/OnDemand/Rest/latest/
Accounts?orderBy=AccountName:asc,AccountLocation:asc&limit=100&offset=0&fields=RowId,AccountName,AccountLocation

All paged responses contain a lastpage attribute indicating whether or not the last value in the paging collection resources query set has been returned. In the example below, a paged response has the lastpage attribute set to true, indicating that the last value in the paging collection resources query set has been returned.

"_contextInfo": {
  "limit": 100,
  "offset": 0,
  "lastpage" : true
}

Oracle CRM On Demand REST API Developer's Guide, Release 32 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.