Create a new rollout for an application
Creates a rollout to update the application’s configuration across instances
with minimal downtime. Rollouts apply only to scheduler-backed applications
with scheduling_policy: "default". Versions and rollouts do not apply to
applications with scheduling_policy: "durable_object".
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.
Path Parameters
Body ParametersJSON
Initial target version percentage (0-100). Version sync actively replaces instances to match. Required when strategy is “new_instances” and kind is “full_manual”. When strategy is “new_instances” and kind is “full_auto”, omitted percentage starts at 10% or the smallest percentage that targets at least one instance. Unused for “rolling”.
Create a new rollout for an application
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/containers/applications/$APPLICATION_ID/rollouts \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"description": "description",
"strategy": "rolling",
"target_configuration": {}
}'{
"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",
"created_at": "2021-04-01T12:32:41.488Z",
"current_configuration": {
"authorized_keys": [
{
"public_key": "public_key",
"name": "name"
}
],
"command": [
"myapp",
"--default-option"
],
"entrypoint": [
"/bin/bash"
],
"environment_variables": [
{
"name": "name",
"value": "value"
}
],
"image": "image",
"instance_type": "lite",
"observability": {
"logs": {
"enabled": true
}
}
},
"current_version": 0,
"description": "description",
"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"
},
"kind": "full_auto",
"last_updated_at": "2021-04-01T12:32:41.488Z",
"status": "pending",
"strategy": "rolling",
"target_configuration": {
"authorized_keys": [
{
"public_key": "public_key",
"name": "name"
}
],
"command": [
"myapp",
"--default-option"
],
"entrypoint": [
"/bin/bash"
],
"environment_variables": [
{
"name": "name",
"value": "value"
}
],
"image": "image",
"instance_type": "lite",
"observability": {
"logs": {
"enabled": true
}
}
},
"target_version": 0,
"percentage": 0,
"progress": {
"current_step": 0,
"total_instances": 0,
"total_steps": 0,
"updated_instances": 0,
"version_distribution": {
"current_version_instances": 0,
"current_version_percentage": 0,
"target_version_instances": 0,
"target_version_percentage": 0
}
},
"started_at": "2019-12-27T18:11:19.117Z",
"steps": [
{
"id": 0,
"description": "description",
"status": "pending",
"step_size": {
"percentage": 0
},
"completed_at": "2021-04-01T12:32:41.488Z",
"reason": "reason",
"started_at": "2021-04-01T12:32:41.488Z"
}
],
"version_distribution": {
"current_version_percentage": 0,
"target_version_percentage": 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",
"created_at": "2021-04-01T12:32:41.488Z",
"current_configuration": {
"authorized_keys": [
{
"public_key": "public_key",
"name": "name"
}
],
"command": [
"myapp",
"--default-option"
],
"entrypoint": [
"/bin/bash"
],
"environment_variables": [
{
"name": "name",
"value": "value"
}
],
"image": "image",
"instance_type": "lite",
"observability": {
"logs": {
"enabled": true
}
}
},
"current_version": 0,
"description": "description",
"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"
},
"kind": "full_auto",
"last_updated_at": "2021-04-01T12:32:41.488Z",
"status": "pending",
"strategy": "rolling",
"target_configuration": {
"authorized_keys": [
{
"public_key": "public_key",
"name": "name"
}
],
"command": [
"myapp",
"--default-option"
],
"entrypoint": [
"/bin/bash"
],
"environment_variables": [
{
"name": "name",
"value": "value"
}
],
"image": "image",
"instance_type": "lite",
"observability": {
"logs": {
"enabled": true
}
}
},
"target_version": 0,
"percentage": 0,
"progress": {
"current_step": 0,
"total_instances": 0,
"total_steps": 0,
"updated_instances": 0,
"version_distribution": {
"current_version_instances": 0,
"current_version_percentage": 0,
"target_version_instances": 0,
"target_version_percentage": 0
}
},
"started_at": "2019-12-27T18:11:19.117Z",
"steps": [
{
"id": 0,
"description": "description",
"status": "pending",
"step_size": {
"percentage": 0
},
"completed_at": "2021-04-01T12:32:41.488Z",
"reason": "reason",
"started_at": "2021-04-01T12:32:41.488Z"
}
],
"version_distribution": {
"current_version_percentage": 0,
"target_version_percentage": 0
}
},
"success": true
}