Pagination and API Data


Overview

The OneCloud API implements pagination through query parameters to manage large dataset responses efficiently. Pagination should be used on all collection endpoints that return multiple records.

Note: Pagination parameters should not be applied to GET requests for a single resource (e.g., fetching one user by ID). They only apply to collection endpoints.

Parameters

ParameterDescription
startThe starting position for records in the result set. Use start=1 for the first record.
limitThe maximum number of records to return per request.

Example

Retrieve the first 100 domains:

GET /ns-api/v2/domains?start=1&limit=100

Retrieve the next 100:

GET /ns-api/v2/domains?start=101&limit=100

Continue incrementing start by your limit value to traverse all pages.

Best Practices

  • Start small — test with limit=1 to examine the response structure before scaling to larger batches.
  • Use reasonable page sizes — 50 to 200 records per request is a good range. Requesting thousands of records in a single call increases response times and memory usage.
  • Stop when results are empty — when a response returns fewer records than your limit, you have reached the end of the dataset.
  • Do not fetch all pages in parallel — paginate sequentially. Firing many page requests simultaneously can trigger rate limiting (see API Best Practices).