Modify an application
Modifies a single application by id. Durable Object-managed application settings are
published to runtime metadata without creating deployments or rollouts. Top-level
observability for these applications supports only logs.enabled.
The supported fields depend on the existing
application’s scheduling policy. For scheduler-backed applications, changes that
replace instance deployment configuration, including the image, require a rollout.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Accepted Permissions (at least one required)
Path Parameters
Modify an application
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/containers/applications/$APPLICATION_ID \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "id",
"account_id": "account_id",
"configuration": {
"image": "image",
"authorized_keys": [
{
"public_key": "public_key",
"name": "name"
}
],
"command": [
"myapp",
"--default-option"
],
"entrypoint": [
"/bin/bash"
],
"environment_variables": [
{
"name": "name",
"value": "value"
}
],
"instance_type": "lite",
"observability": {
"logs": {
"enabled": true
}
}
},
"created_at": "2021-04-01T12:32:41.488Z",
"instances": 0,
"name": "name",
"scheduling_policy": "default",
"updated_at": "2021-04-01T12:32:41.488Z",
"version": 0,
"active_rollout_id": "active_rollout_id",
"constraints": {
"jurisdiction": "jurisdiction",
"regions": [
"WNAM"
]
},
"durable_objects": {
"namespace_id": "14758f1afd44c09b7992073ccf00b43d"
},
"health": {
"errors": [
{
"event": {
"id": "id",
"details": {
"foo": "bar"
},
"message": "message",
"name": "SchedulerPlaced",
"statusChange": {
"foo": "bar"
},
"time": "2021-04-01T12:32:41.488Z",
"type": "Info"
},
"instance_id": "instance_id"
}
],
"instances": {
"active": 0,
"assigned": 0
},
"summary": "healthy"
},
"max_instances": 0,
"observability": {
"logs": {
"enabled": true
}
},
"rollout_active_grace_period": 0
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "id",
"account_id": "account_id",
"configuration": {
"image": "image",
"authorized_keys": [
{
"public_key": "public_key",
"name": "name"
}
],
"command": [
"myapp",
"--default-option"
],
"entrypoint": [
"/bin/bash"
],
"environment_variables": [
{
"name": "name",
"value": "value"
}
],
"instance_type": "lite",
"observability": {
"logs": {
"enabled": true
}
}
},
"created_at": "2021-04-01T12:32:41.488Z",
"instances": 0,
"name": "name",
"scheduling_policy": "default",
"updated_at": "2021-04-01T12:32:41.488Z",
"version": 0,
"active_rollout_id": "active_rollout_id",
"constraints": {
"jurisdiction": "jurisdiction",
"regions": [
"WNAM"
]
},
"durable_objects": {
"namespace_id": "14758f1afd44c09b7992073ccf00b43d"
},
"health": {
"errors": [
{
"event": {
"id": "id",
"details": {
"foo": "bar"
},
"message": "message",
"name": "SchedulerPlaced",
"statusChange": {
"foo": "bar"
},
"time": "2021-04-01T12:32:41.488Z",
"type": "Info"
},
"instance_id": "instance_id"
}
],
"instances": {
"active": 0,
"assigned": 0
},
"summary": "healthy"
},
"max_instances": 0,
"observability": {
"logs": {
"enabled": true
}
},
"rollout_active_grace_period": 0
},
"success": true
}