Skip to content
中文

Create deployment

POST /application/v1/workers/{worker_id}/deployments

Deploy one version to serve the Worker. Unlike Cloudflare, a deployment holds exactly one version at 100 percent (no gradual rollout), so strategy must be percentage. Deployment is asynchronous; poll the deployment until praxis.status is active or failed.

Support: supported

Parameters

NameLocationTypeRequiredDescription
worker_idpathstringtrueWorker ID (wkr_…).

Request body (application/json)

Required: true

NameTypeDescription
strategystringRollout strategy.
versionsarray<object>Exactly one version at 100 percent.
versions[].version_idstringVersion to deploy.
versions[].percentagenumberMust be 100.
forcebooleanOwn face only; on the compatible face use the force query parameter.
annotationsobjectFree-form annotations.
annotations.workers/messagestringDeployment message.
{
"type": "object",
"required": [
"strategy",
"versions"
],
"properties": {
"strategy": {
"type": "string",
"description": "Rollout strategy.",
"enum": [
"percentage"
],
"x-enum-descriptions": {
"percentage": "Split traffic by percentage; only a single version at 100 is accepted."
},
"example": "percentage"
},
"versions": {
"type": "array",
"description": "Exactly one version at 100 percent.",
"items": {
"type": "object",
"required": [
"version_id",
"percentage"
],
"properties": {
"version_id": {
"type": "string",
"description": "Version to deploy."
},
"percentage": {
"type": "number",
"description": "Must be 100."
}
}
}
},
"force": {
"type": "boolean",
"description": "Own face only; on the compatible face use the force query parameter."
},
"annotations": {
"type": "object",
"description": "Free-form annotations.",
"required": [],
"properties": {
"workers/message": {
"type": "string",
"description": "Deployment message."
}
}
}
}
}

Response

HTTP 200

Success

application/json

Name Type Description
id string Deployment ID, prefixed dep_.
created_on string When the deployment was created.
source string Origin: api, sdk, console or rollback.
strategy string Rollout strategy.
versions array<object> Exactly one version at 100 percent.
versions[].version_id string Deployed version.
versions[].percentage number Traffic share; always 100.
annotations object Free-form annotations.
annotations.workers/message string Deployment message.
annotations.workers/triggered_by string What triggered the deployment.
author_email string | null Who created the deployment.
praxis object Platform fields: deployments run asynchronously, so track status, progress and error here.
praxis.worker_id string Owning Worker.
praxis.status string Deployment status: pending (queued), uploading (pushing components and assets), activating (switching traffic), active (serving), superseded (replaced by a later deployment), failed (see error), cancelled (replaced before it finished).
praxis.progress object | null Upload progress.
praxis.error object | null Why the deployment failed.
praxis.finished_on string | null When the deployment reached a final status.