List Response Format
All list endpoints return a consistent structure:| Field | Type | Description |
|---|---|---|
object | string | Always “list” |
data | array | Array of resource objects |
has_more | boolean | Whether more results exist |
next_cursor | string | Cursor for next page (null if no more results) |
url | string | Endpoint URL |
request_id | string | Request ID |
Pagination Parameters
cursor
Use thecursor query parameter to fetch the next page:
limit
Control the number of results per page with thelimit parameter:
- Sandboxes: 20 per page
- Templates: 50 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:Endpoints with Pagination
All list endpoints support pagination:| Endpoint | Default Limit | Max Limit |
|---|---|---|
GET /v1/sandboxes | 20 | 100 |
GET /v1/templates | 50 | 100 |
Best Practices
1. Use Reasonable Page Sizes
2. Store and Reuse Cursors
3. Handle Empty Results
Shell Script Example
Related
- API Introduction - Learn about the HopX API
- Rate Limits - Understand API rate limits
- Data Model - Learn about API resources
- Python SDK Quickstart - Use the Python SDK (handles pagination automatically)
- CLI Reference - Command-line interface
Next Steps
- Data Model - Core resources and data structures
- Rate Limits - Request rate limits
- Errors - Error handling and codes

