Skip to content
Start here

Triggers

List triggers for a Worker
GET/accounts/{account_id}/builds/workers/{external_script_id}/triggers
Create a build trigger
POST/accounts/{account_id}/builds/triggers
Update a build trigger
PATCH/accounts/{account_id}/builds/triggers/{trigger_uuid}
Delete a build trigger
DELETE/accounts/{account_id}/builds/triggers/{trigger_uuid}
Purge a trigger's build cache
POST/accounts/{account_id}/builds/triggers/{trigger_uuid}/purge_build_cache
Start a Workers build
POST/accounts/{account_id}/builds/triggers/{trigger_uuid}/builds
ModelsExpand Collapse
TriggerListResponse object { branch_excludes, branch_includes, build_caching_enabled, 14 more }
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.

build_token_name: optional string
build_token_uuid: optional string

UUID of the build token used when deploying the Worker.

formatuuid
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
TriggerCreateResponse object { branch_excludes, branch_includes, build_caching_enabled, 14 more }
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.

build_token_name: optional string
build_token_uuid: optional string

UUID of the build token used when deploying the Worker.

formatuuid
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
TriggerUpdateResponse object { branch_excludes, branch_includes, build_caching_enabled, 14 more }
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.

build_token_name: optional string
build_token_uuid: optional string

UUID of the build token used when deploying the Worker.

formatuuid
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
TriggerDeleteResponse = unknown
TriggerPurgeCacheResponse = unknown
TriggerCreateBuildResponse 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

TriggersEnvironment Variables

List build variables
GET/accounts/{account_id}/builds/triggers/{trigger_uuid}/environment_variables
Set build variables
PATCH/accounts/{account_id}/builds/triggers/{trigger_uuid}/environment_variables
Delete a build variable
DELETE/accounts/{account_id}/builds/triggers/{trigger_uuid}/environment_variables/{environment_variable_key}
ModelsExpand Collapse
EnvironmentVariableListResponse = map[object { created_on, is_secret, value } ]
created_on: string
formatdate-time
is_secret: boolean

Whether to hide the value after it is saved. Secret values remain available to builds but appear as null when you list variables; non-secret values remain visible.

value: optional string

Value is null for secret environment variables

EnvironmentVariableUpsertResponse = map[object { created_on, is_secret, value } ]
created_on: string
formatdate-time
is_secret: boolean

Whether to hide the value after it is saved. Secret values remain available to builds but appear as null when you list variables; non-secret values remain visible.

value: optional string

Value is null for secret environment variables

EnvironmentVariableDeleteResponse = unknown