Skip to content
Start here

List of workflow instances

GET/accounts/{account_id}/workflows/{workflow_name}/instances

Lists all instances of a workflow with their execution status.

Security
API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Workers Tail ReadWorkers Scripts WriteWorkers Scripts Read
Path ParametersExpand Collapse
account_id: string
workflow_name: string
maxLength64
minLength1
Query ParametersExpand Collapse
cursor: optional string

page and cursor are mutually exclusive, use one or the other.

date_end: optional string

Accepts ISO 8601 with no timezone offsets and in UTC.

formatdate-time
date_start: optional string

Accepts ISO 8601 with no timezone offsets and in UTC.

formatdate-time
direction: optional "asc" or "desc"

should only be used when cursor is used, defines a new direction for the cursor

One of the following:
"asc"
"desc"
page: optional number

page and cursor are mutually exclusive, use one or the other.

minimum1
per_page: optional number
maximum100
minimum1
status: optional "queued" or "running" or "paused" or 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
ReturnsExpand Collapse
errors: array of object { code, message }
code: number
message: string
messages: array of object { code, message }
code: number
message: string
result: array of object { id, created_on, ended_on, 5 more }
id: string
maxLength100
minLength1
created_on: string
formatdate-time
ended_on: string
formatdate-time
modified_on: string
formatdate-time
started_on: string
formatdate-time
status: "queued" or "running" or "paused" or 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
version_id: string
formatuuid
workflow_id: string
formatuuid
success: true
result_info: optional object { count, per_page, total_count, 2 more }
count: number
per_page: number
total_count: number
cursor: optional string
page: optional number

List of workflow instances

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows/$WORKFLOW_NAME/instances \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": [
    {
      "id": "x",
      "created_on": "2019-12-27T18:11:19.117Z",
      "ended_on": "2019-12-27T18:11:19.117Z",
      "modified_on": "2019-12-27T18:11:19.117Z",
      "started_on": "2019-12-27T18:11:19.117Z",
      "status": "queued",
      "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "workflow_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    }
  ],
  "success": true,
  "result_info": {
    "count": 0,
    "per_page": 0,
    "total_count": 0,
    "cursor": "cursor",
    "page": 0
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": [
    {
      "id": "x",
      "created_on": "2019-12-27T18:11:19.117Z",
      "ended_on": "2019-12-27T18:11:19.117Z",
      "modified_on": "2019-12-27T18:11:19.117Z",
      "started_on": "2019-12-27T18:11:19.117Z",
      "status": "queued",
      "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "workflow_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    }
  ],
  "success": true,
  "result_info": {
    "count": 0,
    "per_page": 0,
    "total_count": 0,
    "cursor": "cursor",
    "page": 0
  }
}