Lists all environments in the current account that are not archived. This endpoint supports cursor-based pagination.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
Query parameters
|
Parameter |
Type |
Required |
Description |
|
|
integer |
No |
The maximum number of items to return per page. The default value is 20. |
|
|
string |
No |
A cursor for pagination. The response includes records that appear after this ID. |
|
|
string |
No |
A cursor for pagination. The response includes records that appear before this ID. |
For more details, see Pagination.
Example request
curl -s -X GET "https://api.qoder.com.cn/api/v1/cloud/environments" \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"data": [
{
"id": "env_019e3bb39b6774d8878cd0b9d237574b",
"type": "environment",
"name": "doc-test-env",
"description": "",
"status": "ready",
"config": {
"type": "cloud",
"networking": {
"type": "limited"
},
"packages": {
"apt": ["curl"]
}
},
"archived": false,
"archived_at": null,
"created_at": "2026-05-18T15:28:07.017808Z",
"updated_at": "2026-05-18T15:28:07.017808Z"
},
{
"id": "env_019e2590d33f711fabf42f2857cecd8a",
"type": "environment",
"name": "default",
"description": "",
"status": "ready",
"config": {
"type": "cloud",
"networking": {
"allow_package_managers": true,
"type": "limited"
},
"packages": {}
},
"archived": false,
"archived_at": null,
"created_at": "2026-05-14T08:18:28.800813Z",
"updated_at": "2026-05-14T08:18:28.800813Z"
}
],
"first_id": "env_019e3bb39b6774d8878cd0b9d237574b",
"has_more": false,
"last_id": "env_019e2590d33f711fabf42f2857cecd8a"
}
Response fields
|
Field |
Type |
Description |
|
|
array |
A list of environment objects. |
|
|
string |
The ID of the first record on this page. |
|
|
string |
The ID of the last record on this page. |
|
|
boolean |
Indicates whether more results are available. Returns |
Error codes
|
HTTP |
Type |
Description |
|
401 |
|
Authentication failed. The Personal Access Token (PAT) is invalid or has expired. |
|
403 |
|
You do not have permission to perform this action. |