workers_builds
Creates, updates, deletes, gets or lists a workers_builds resource.
Overview
| Name | workers_builds |
| Type | Resource |
| Id | cloudflare.workers.workers_builds |
Fields
The following fields are returned by SELECT queries:
- list_by_account
Builds retrieved successfully
| Name | Datatype | Description |
|---|---|---|
build_outcome | string | (success, fail, skipped, cancelled, terminated) (example: success) |
build_trigger_metadata | object | |
build_uuid | string (uuid) | Build UUID. |
created_on | string (date-time) | |
initializing_on | string (date-time) | |
modified_on | string (date-time) | |
pull_request | object | |
running_on | string (date-time) | |
status | string | (queued, initializing, running, stopped) (example: running) |
stopped_on | string (date-time) | |
trigger | object | Trigger information without build_token_uuid |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_account | select | account_id, external_script_id | page, per_page | Get 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
external_script_id | string | |
page | integer | Page number for pagination |
per_page | integer | Number of items per page |
SELECT examples
- list_by_account
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 }}'
;