All list endpoints in the Qoder Cloud Agents CN API use cursor-based pagination. Pass
All list endpoints return the same pagination envelope:
Use
Use the current page's
The following script iterates through all Agents:
Passing
When no data is available or the end of the list is reached:
before_id or after_id to page through results. Cursors remain stable across data changes.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| limit | integer | No | 20 | Items per page, range 1–100 |
| before_id | string | No | — | Returns records before this ID (paging backward) |
| after_id | string | No | — | Returns records after this ID (paging forward) |
before_id and after_id are mutually exclusive. Sending both returns 400 invalid_request_error.
Some resources (Files, Skills, Vaults) use after/before as parameter names in their list endpoints, which are equivalent to after_id/before_id defined on this page — the server accepts both.
Response structure
All list endpoints return the same pagination envelope:
Field descriptions
| Field | Type | Description |
| data | array | Resources on the current page |
| first_id | string | null | ID of the first record on this page |
| last_id | string | null | ID of the last record on this page |
| has_more | boolean | Whether more records remain |
Basic usage
Fetch the first page
Page forward
Use last_id from the previous response as after_id:
Page backward
Use the current page's first_id as before_id:
Full traversal example
The following script iterates through all Agents:
limit behavior
| Value | Behavior |
|---|---|
| Omitted | Defaults to 20 |
| 1 | Minimum, returns 1 record |
| 100 | Maximum, returns 100 records |
| 0 or negative | Returns 400 |
| > 100 | **Silently capped at 100** (HTTP 200, no error).has_morereflects whether additional records remain |
limit > 100 does not return 400 — the API silently caps the page at 100 records. Code that sets limit=500 receives only the first 100 with no error. Use after_id to page through the rest.
Empty results
When no data is available or the end of the list is reached:
Notes
- Cursor stability — cursors are based on resource IDs, so concurrent writes do not cause duplicates or skips.
- Sort order — records are returned in descending creation time by default (newest first).
- Deleted resources — using a deleted resource ID as a cursor may return 400.
- Concurrent paging — paging is safe to perform concurrently from multiple clients.