Partially Update Environment Compose Definition
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/applications/test-app/environments/test-env/compose';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"architecture":"example","taskCpu":"example","taskMemory":"example","minCapacity":1,"maxCapacity":1,"containers":[{}],"spotConfiguration":{"strategy":"off"},"enableCrossEnvNetworking":true,"enableCrossAppNetworking":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://dashboard.quantcdn.io/api/v3/organizations/test-org/applications/test-app/environments/test-env/compose \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "architecture": "example", "taskCpu": "example", "taskMemory": "example", "minCapacity": 1, "maxCapacity": 1, "containers": [ {} ], "spotConfiguration": { "strategy": "off" }, "enableCrossEnvNetworking": true, "enableCrossAppNetworking": true }'Partially updates top-level fields of the environment’s compose definition, such as architecture, task-level CPU/Memory, or min/max scaling capacity. Only fields included in the request body are modified. The ‘containers’ array, if provided, REPLACES the existing containers array; if omitted, the existing containers are NOT modified by this PATCH operation. (For modifying individual containers, use PATCH /containers/{containerName}). This triggers a validation, registers a new task definition, and updates the service.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
Example
test-orgThe application ID
Example
test-appThe environment ID
Example
test-envRequest Bodyrequired
Section titled “Request Bodyrequired”Partial compose definition updates. All fields are optional.
object
object
object
Responses
Section titled “Responses”Request accepted, compose definition partial update is processing. Returns the full updated compose definition.
object
object
object
Example
{ "architecture": "ARM64", "taskCpu": "512", "taskMemory": "2048", "minCapacity": 1, "maxCapacity": 1, "spotConfiguration": { "strategy": "off", "tolerateDowntime": true }, "enableCrossEnvNetworking": true, "enableCrossAppNetworking": true}Invalid compose definition or validation failed.
object
object
Examplegenerated
{ "message": "example", "errors": {}}Application or environment not found
