List environments under the current account with cursor pagination.
GET /api/v1/cloud/environments
Lists environments under the current account with cursor pagination. Archived environments are excluded by default.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or SAT> |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 20 | Items per page. Range 1-100; values above 100 return 400 invalid_request_error |
page | string | No | - | Cursor returned by the previous response's next_page |
include_archived | boolean | No | false | Set to true to include archived environments |
created_at[gte] | string | No | - | Include environments created at or after this RFC 3339 timestamp |
created_at[lte] | string | No | - | Include environments created at or before this RFC 3339 timestamp |
Example request
Example response
HTTP 200 OK
Response fields
| Field | Type | Description |
|---|---|---|
data | array of Environment object | Environments on the current page |
first_id | string | ID of the first record on this page |
last_id | string | 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 | Invalid pagination cursor |
| 400 | invalid_request_error | created_at[gte] or created_at[lte] is not RFC 3339 |
| 401 | authentication_error | PAT or SAT invalid or expired |
| 403 | permission_error | Not authorized for this resource |
Notes
- Records are returned in descending ID order by default.
- Archived environments do not appear in the default listing. Pass
include_archived=trueto include them. - Pagination is cursor-based; offset-based pagination is not supported.