PATCH /api/v3/envs

The Environment PATCH API allows you to update specific fields of an environment by providing only the fields you want to change. This API uses JSON Patch operations to apply partial updates to environment details.
The editable fields are:
• Name – Environment name
• Description – Environment description
• VmPageImagePath – VM page image path
• Labels – Environment labels (array of strings)
• SnapshotOnAutoDelete – Whether to snapshot on auto delete (boolean)

Request Path

PATCH /api/v3/envs

The request body should follow the JSON Patch format:

{
"changes": [
{
"op": "Replace",
"path": "/PropertyName",
"value": "NewValue"
}
]
}

Example: Update Labels

{
"changes": [
{
"op": "Replace",
"path": "/Labels",
"value": [
"production",
"web-server",
"critical"
]
}
]
}

Response

On successful update, the API returns the updated environment details:

{
"id": "ENxxxxxxxxx",
"name": "Updated Environment Name",
"description": "This environment has been updated via API",
"labels": [
"production",
"web",
"tier1"
],
"status": "Running",
"startTime": "2024-01-07T10:30:00Z",
// ... other environment details
}