Update the properties of a specified environment, such as name, description, and configuration.
POST /api/v1/cloud/environments/{environment_id}
Updates the properties of a specified environment (such as name, description, and configuration).
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Environment unique identifier (prefixed with |
Request body
Include only the fields you want to update. Omitted fields remain unchanged.
|
Field |
Type |
Required |
Description |
|
|
string |
No |
Environment name |
|
|
string |
No |
Environment description |
|
|
Environment config |
No |
Replaces the saved Environment configuration |
|
|
object |
No |
Metadata patch. String values add or update keys; |
Example request
curl -s -X POST "https://api.qoder.com.cn/api/v1/cloud/environments/env_019e3bb39b6774d8878cd0b9d237574b" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"description": "Environment for API documentation testing"
}'
Example response
HTTP 200 OK
{
"id": "env_019e3bb39b6774d8878cd0b9d237574b",
"type": "environment",
"name": "doc-test-env",
"description": "Environment for API documentation testing",
"config": {
"type": "cloud",
"networking": {
"type": "limited",
"allowed_hosts": [],
"allow_package_managers": false,
"allow_mcp_servers": false
},
"packages": {
"type": "packages",
"apt": ["curl"],
"npm": [],
"pip": []
}
},
"metadata": {},
"archived_at": null,
"created_at": "2026-05-18T15:28:07.017808Z",
"updated_at": "2026-05-18T15:28:08.093156Z"
}
Response fields
|
Field |
Type |
Description |
|
|
string |
Environment unique identifier |
|
|
string |
Resource type, always |
|
|
string |
Environment name |
|
|
string |
Updated description |
|
|
Environment config |
Environment configuration |
|
|
Metadata object |
Custom metadata |
|
|
string|null |
Archive time (ISO 8601); |
|
|
string |
Creation time (ISO 8601) |
|
|
string |
Last update time (reflects the latest change) |
Errors
|
HTTP |
type |
Description |
|
400 |
|
Request body, |
|
401 |
|
Authentication failed; PAT invalid or expired |
|
403 |
|
Not authorized to access this resource |
|
404 |
|
Environment with the specified ID does not exist |
Notes
-
Omitted fields remain unchanged
-
Providing
configexplicitly replaces the saved configuration entirely -
Providing
metadataexplicitly merges string values into the saved metadata object;nullvalues remove existing keys