GET /api/v1/cloud/environments/{environment_id}/work
Lists work items for a self_hosted Environment. Results use cursor pagination and are returned in ascending ID order, which matches queue creation order.
Path parameters
| Parameter | Type | Description |
|---|---|---|
environment_id | string | Environment ID with the env_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 20 | Items per page. Must be positive; values above 100 are capped at 100 |
page | string | No | - | Cursor returned by the previous response’s next_page |
before_id | string | No | - | Return records before this work item ID |
after_id | string | No | - | Return records after this work item ID |
page, before_id, and after_id are mutually exclusive. See Pagination for cursor semantics.
Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
data | array of Work item objects | Work items 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 |
next_page | string|null | Cursor for the next page. Equals last_id when has_more is true, otherwise null |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | limit is not a positive integer |
| 400 | invalid_request_error | More than one of page, before_id, and after_id was provided |
| 400 | invalid_request_error | The Environment is not self_hosted |
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized for this operation |
| 404 | not_found_error | Environment not found |
Related
Cloud environment setup
Choose the container, network, and dependencies your agent runs in.