Workflows

Workflows

Methods

list(, ): <>
get/accounts/{account_id}/workflows

List all Workflows

get(, , ):
get/accounts/{account_id}/workflows/{workflow_name}

Get Workflow details

update(, , ):
put/accounts/{account_id}/workflows/{workflow_name}

Create/modify Workflow

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Workers Scripts Write

Parameters
workflowName: string
(maxLength: 64, minLength: 1)
account_id: string

Path param

class_name: string
(maxLength: 255, minLength: 1)

Body param

script_name: string
(maxLength: 255, minLength: 1)

Body param

Returns
WorkflowUpdateResponse{
id: string
(format: uuid)
class_name: string
created_on: string
(format: date-time)
is_deleted: number
modified_on: string
(format: date-time)
name: string
(maxLength: 64, minLength: 1)
script_name: string
terminator_running: number
triggered_on: string | null
(format: date-time)
version_id: string
(format: uuid)
Request example
200Example
delete(, , ):
delete/accounts/{account_id}/workflows/{workflow_name}

Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.

Workflows

Instances

Workflows.Instances

Methods

list(, , ): <>
get/accounts/{account_id}/workflows/{workflow_name}/instances

List of workflow instances

get(, , , ):
get/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}

Get logs and status from instance

create(, , ):
post/accounts/{account_id}/workflows/{workflow_name}/instances

Create a new workflow instance

bulk(, , ): <>
post/accounts/{account_id}/workflows/{workflow_name}/instances/batch

Batch create new Workflow instances

Workflows.Instances.Events

Methods

create(, , , , ):
post/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}

Send event to instance

Workflows.Instances.Status

Methods

edit(, , , ):
patch/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/status

Change status of instance

Workflows

Versions

Workflows.Versions

Methods

list(, , ): <>
get/accounts/{account_id}/workflows/{workflow_name}/versions

List deployed Workflow versions

get(, , , ):
get/accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}

Get Workflow version details