Skip to content
Start here

Builds

List builds for a Worker
GET/accounts/{account_id}/builds/workers/{external_script_id}/builds
Get a Workers build
GET/accounts/{account_id}/builds/builds/{build_uuid}
Cancel a Workers build
PUT/accounts/{account_id}/builds/builds/{build_uuid}/cancel
ModelsExpand Collapse
BuildListResponse object { build_outcome, build_trigger_metadata, build_uuid, 10 more }
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_trigger_metadata: optional object { author, branch, build_command, 11 more }
author: optional string
branch: optional string

Git branch name.

build_command: optional string

Command to build the Worker.

build_token_name: optional string
build_token_uuid: optional string

UUID of the build token used when deploying the Worker.

formatuuid
build_trigger_source: optional "push" or "pull_request" or "manual" or "api"
One of the following:
"push"
"pull_request"
"manual"
"api"
commit_hash: optional string

Git commit hash

commit_message: optional string
deploy_command: optional string

Command to deploy the Worker.

environment_variables: optional map[string]
provider_account_name: optional string

Human-readable name of the account or namespace that owns the repository.

provider_type: optional "github" or "gitlab" or "gitlab_internal" or "origin"

Source control provider.

One of the following:
"github"
"gitlab"
"gitlab_internal"
"origin"
repo_name: optional string

Human-readable repository name.

root_directory: optional string

Repository directory in which build and deploy commands run.

build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time
deploy_hook: optional object { deploy_hook_name }
deploy_hook_name: optional string

Deploy hook name (1-58 characters).

maxLength58
minLength1
initializing_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
preview_url: optional string

URL serving the Worker version this build deployed. Only returned by Get build by UUID, and only once the build has produced a preview artifact.

formaturi
pull_request: optional object { closed_on, created_on, pull_request_url }
closed_on: optional string
formatdate-time
created_on: optional string
formatdate-time
pull_request_url: optional string
formaturi
running_on: optional string
formatdate-time
status: optional "queued" or "initializing" or "running" or "stopped"
One of the following:
"queued"
"initializing"
"running"
"stopped"
stopped_on: optional string
formatdate-time
trigger: optional object { branch_excludes, branch_includes, build_caching_enabled, 12 more }

Trigger information without build_token_uuid

branch_excludes: optional array of string

Branch patterns that must not start builds.

branch_includes: optional array of string

Branch patterns that can start builds.

build_caching_enabled: optional boolean

Whether builds reuse cached dependencies and build artifacts.

build_command: optional string

Command to build the Worker.

created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string

Command to deploy the Worker.

external_script_id: optional string

System-generated tag of the Worker. This is not the Worker name.

modified_on: optional string
formatdate-time
path_excludes: optional array of string

Path patterns that must not start builds.

path_includes: optional array of string

Path patterns that can start builds.

repo_connection: optional object { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider-specific identifier of the account or namespace that owns the repository.

provider_account_name: optional string

Human-readable name of the account or namespace that owns the repository.

provider_type: optional "github" or "gitlab" or "gitlab_internal" or "origin"

Source control provider.

One of the following:
"github"
"gitlab"
"gitlab_internal"
"origin"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Provider-specific repository identifier.

repo_name: optional string

Human-readable repository name.

root_directory: optional string

Repository directory in which build and deploy commands run.

trigger_name: optional string

Human-readable name of the build trigger.

trigger_uuid: optional string

Trigger UUID.

formatuuid
BuildGetResponse object { build_outcome, build_trigger_metadata, build_uuid, 10 more }
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_trigger_metadata: optional object { author, branch, build_command, 11 more }
author: optional string
branch: optional string

Git branch name.

build_command: optional string

Command to build the Worker.

build_token_name: optional string
build_token_uuid: optional string

UUID of the build token used when deploying the Worker.

formatuuid
build_trigger_source: optional "push" or "pull_request" or "manual" or "api"
One of the following:
"push"
"pull_request"
"manual"
"api"
commit_hash: optional string

Git commit hash

commit_message: optional string
deploy_command: optional string

Command to deploy the Worker.

environment_variables: optional map[string]
provider_account_name: optional string

Human-readable name of the account or namespace that owns the repository.

provider_type: optional "github" or "gitlab" or "gitlab_internal" or "origin"

Source control provider.

One of the following:
"github"
"gitlab"
"gitlab_internal"
"origin"
repo_name: optional string

Human-readable repository name.

root_directory: optional string

Repository directory in which build and deploy commands run.

build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time
deploy_hook: optional object { deploy_hook_name }
deploy_hook_name: optional string

Deploy hook name (1-58 characters).

maxLength58
minLength1
initializing_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
preview_url: optional string

URL serving the Worker version this build deployed. Only returned by Get build by UUID, and only once the build has produced a preview artifact.

formaturi
pull_request: optional object { closed_on, created_on, pull_request_url }
closed_on: optional string
formatdate-time
created_on: optional string
formatdate-time
pull_request_url: optional string
formaturi
running_on: optional string
formatdate-time
status: optional "queued" or "initializing" or "running" or "stopped"
One of the following:
"queued"
"initializing"
"running"
"stopped"
stopped_on: optional string
formatdate-time
trigger: optional object { branch_excludes, branch_includes, build_caching_enabled, 12 more }

Trigger information without build_token_uuid

branch_excludes: optional array of string

Branch patterns that must not start builds.

branch_includes: optional array of string

Branch patterns that can start builds.

build_caching_enabled: optional boolean

Whether builds reuse cached dependencies and build artifacts.

build_command: optional string

Command to build the Worker.

created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string

Command to deploy the Worker.

external_script_id: optional string

System-generated tag of the Worker. This is not the Worker name.

modified_on: optional string
formatdate-time
path_excludes: optional array of string

Path patterns that must not start builds.

path_includes: optional array of string

Path patterns that can start builds.

repo_connection: optional object { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider-specific identifier of the account or namespace that owns the repository.

provider_account_name: optional string

Human-readable name of the account or namespace that owns the repository.

provider_type: optional "github" or "gitlab" or "gitlab_internal" or "origin"

Source control provider.

One of the following:
"github"
"gitlab"
"gitlab_internal"
"origin"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Provider-specific repository identifier.

repo_name: optional string

Human-readable repository name.

root_directory: optional string

Repository directory in which build and deploy commands run.

trigger_name: optional string

Human-readable name of the build trigger.

trigger_uuid: optional string

Trigger UUID.

formatuuid
BuildCancelResponse object { build_outcome, build_uuid, stopped_on }
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_uuid: optional string

Build UUID.

formatuuid
stopped_on: optional string
formatdate-time

BuildsLogs

Get Workers build logs
GET/accounts/{account_id}/builds/builds/{build_uuid}/logs
ModelsExpand Collapse
LogGetResponse object { cursor, lines, truncated }
cursor: optional string

Pagination cursor for log retrieval.

lines: optional array of array of number or string
One of the following:
number

Unix epoch timestamp

string

Log message

truncated: optional boolean