Skip to main content

workers_builds

Creates, updates, deletes, gets or lists a workers_builds resource.

Overview

Nameworkers_builds
TypeResource
Idcloudflare.workers.workers_builds

Fields

The following fields are returned by SELECT queries:

Builds retrieved successfully

NameDatatypeDescription
build_outcomestring (success, fail, skipped, cancelled, terminated) (example: success)
build_trigger_metadataobject
build_uuidstring (uuid)Build UUID.
created_onstring (date-time)
initializing_onstring (date-time)
modified_onstring (date-time)
pull_requestobject
running_onstring (date-time)
statusstring (queued, initializing, running, stopped) (example: running)
stopped_onstring (date-time)
triggerobjectTrigger information without build_token_uuid

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_accountselectaccount_id, external_script_idpage, per_pageGet all builds for a specific worker script with pagination

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
external_script_idstring
pageintegerPage number for pagination
per_pageintegerNumber of items per page

SELECT examples

Get all builds for a specific worker script with pagination

SELECT
build_outcome,
build_trigger_metadata,
build_uuid,
created_on,
initializing_on,
modified_on,
pull_request,
running_on,
status,
stopped_on,
trigger
FROM cloudflare.workers.workers_builds
WHERE account_id = '{{ account_id }}' -- required
AND external_script_id = '{{ external_script_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;