Skip to content
Start here

Deployments

List Deployments
client.workers.scripts.deployments.list(stringscriptName, DeploymentListParams { account_id } params, RequestOptionsoptions?): DeploymentListResponse { deployments }
GET/accounts/{account_id}/workers/scripts/{script_name}/deployments
Create Deployment
client.workers.scripts.deployments.create(stringscriptName, DeploymentCreateParams { account_id, strategy, versions, 2 more } params, RequestOptionsoptions?): Deployment { id, created_on, source, 4 more }
POST/accounts/{account_id}/workers/scripts/{script_name}/deployments
Get Deployment
client.workers.scripts.deployments.get(stringscriptName, stringdeploymentId, DeploymentGetParams { account_id } params, RequestOptionsoptions?): Deployment { id, created_on, source, 4 more }
GET/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}
Delete Deployment
client.workers.scripts.deployments.delete(stringscriptName, stringdeploymentId, DeploymentDeleteParams { account_id } params, RequestOptionsoptions?): DeploymentDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}
ModelsExpand Collapse
Deployment { id, created_on, source, 4 more }
id: string
formatuuid
created_on: string
formatdate-time
source: string
strategy: "percentage"
versions: Array<Version>
percentage: number
maximum100
minimum0.01
version_id: string
formatuuid
annotations?: Annotations { workers/message, workers/triggered_by }
"workers/message"?: string

Human-readable message about the deployment. Truncated to 100 bytes.

maxLength100
"workers/triggered_by"?: string

Operation that triggered the creation of the deployment.

author_email?: string
formatemail
DeploymentListResponse { deployments }
deployments: Array<Deployment { id, created_on, source, 4 more } >
id: string
formatuuid
created_on: string
formatdate-time
source: string
strategy: "percentage"
versions: Array<Version>
percentage: number
maximum100
minimum0.01
version_id: string
formatuuid
annotations?: Annotations { workers/message, workers/triggered_by }
"workers/message"?: string

Human-readable message about the deployment. Truncated to 100 bytes.

maxLength100
"workers/triggered_by"?: string

Operation that triggered the creation of the deployment.

author_email?: string
formatemail
DeploymentDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.