Number of Records
Endpoints that return a list of resources will include a header indicating the total number of records available. This is specified with the
X-Records header. E.g., for an endpoint with 14 records:
The amount of records returns within a single API request defaults to 50. It may be changed to a maximum of 200 using a
per_page query parameter, e.g. to return 200 accounts at a time:
When there are more records remaining than fit in the current response, the
Link header is specified with the URI to the next page of results.
Status: 200 OK X-Records: 204 Link: <https://your-subdomain.recurly.com/v2/accounts?cursor=1304958672>; rel="next" ETag: "a4b0568a2278bc591ceb64b31547eb78"
The cursor parameter is a time-based pointer indicating where to resume the results. By using a cursor instead of page numbers, the API avoids returning duplicate records in the case where additional resources are added between pagination requests.
After paginating beyond the first page of results, the Link header will include a link to return to the first page of results (
rel="start") and the previous page (
Status: 200 OK X-Records: 204 Link: <https://your-subdomain.recurly.com/v2/transactions>; rel="start", <https://your-subdomain.recurly.com/v2/transactions?cursor=-1318344434>; rel="prev" <https://your-subdomain.recurly.com/v2/transactions?cursor=1318388868>; rel="next" ETag: "c7431fcfc386fd59ee6c3c2e9ac2a30c"