Pagination¶
List envelope¶
All list endpoints return a JSON object with a data array:
Single-resource endpoints (GET /agents/{id}, GET /sessions/{id}, etc.) return the object directly, with no envelope.
No pagination¶
Agent on Demand's list endpoints return all results in a single response — there is no cursor, no page token, and no limit/offset parameter.
| Endpoint | Returns |
|---|---|
GET /agents |
All non-archived agents owned by this token's user, ordered by -created_at |
GET /environments |
All non-archived environments owned by this token's user, ordered by -created_at |
GET /sessions |
All sessions owned by this token's user (including completed, failed, terminated), ordered by -created_at |
GET /agents/{id}/versions |
All version snapshots for the agent, newest first |
GET /environments/{id}/versions |
All version snapshots for the environment, newest first |
Archived resources¶
- Archived agents and environments are excluded from list endpoints. They are still accessible via
GET /agents/{id}orGET /environments/{id}. - Sessions have no archive concept. All sessions (including terminal ones) appear in
GET /sessions. UseDELETE /sessions/{id}/deleteto remove sessions you no longer need.