Skip to main content
The HopX API uses cursor-based pagination for list endpoints. This provides consistent, efficient pagination even when data is being added or removed.

List Response Format

All list endpoints return a consistent structure:

Pagination Parameters

cursor

Use the cursor query parameter to fetch the next page:

limit

Control the number of results per page with the limit parameter:
Default limits vary by endpoint:
  • Sandboxes: 20 per page
  • Templates: 50 per page
Maximum limit: 100 per page

Paginating Through Results

Example: Fetch All Sandboxes

Example: Fetch with Progress

Cursor-Based Pagination Benefits

Consistent Results

Cursor-based pagination provides consistent results even when data changes:

Performance

Cursor-based pagination is more efficient for large datasets:
  • O(1) lookups using the cursor
  • No need to count or skip rows
  • Works well with databases

Filtering with Pagination

Combine filters with pagination:
Example with filters:

Endpoints with Pagination

All list endpoints support pagination:

Best Practices

1. Use Reasonable Page Sizes

2. Store and Reuse Cursors

3. Handle Empty Results

Shell Script Example

Next Steps