Skip to main content
All list endpoints in the Gcore API return paginated results using limit and offset query parameters. Without explicit pagination, a single response returns up to 1000 items — the default for most endpoints. For accounts with many resources, iterating pages is required to retrieve all results.
The code examples require GCORE_API_KEY, GCORE_CLOUD_PROJECT_ID, and GCORE_CLOUD_REGION_ID to be set in the environment — set them up in First API call.

Response structure

Every list response includes count and results:
count is the total across all pages, not the current page alone — use it to calculate how many pages remain.

Parameters

Both parameters are optional and can be combined on any list endpoint:
First page response:
Second page response:

Iterate all pages

Pagination in practice

Most API responses return all results in a single page when the total is under 1000. Pagination becomes important when:
  • An account has hundreds or thousands of instances, volumes, or other resources
  • Filtering is applied server-side and the filtered set still exceeds the default limit
  • Building inventory tooling or cost reporting across all resources
For most individual workflow operations (create VM, attach volume, configure network), pagination is not needed — those operations work on a single resource at a time.