## List of workflow instances `client.workflows.instances.list(stringworkflowName, InstanceListParamsparams, RequestOptionsoptions?): V4PagePaginationArray` **get** `/accounts/{account_id}/workflows/{workflow_name}/instances` Lists all instances of a workflow with their execution status. ### Parameters - `workflowName: string` - `params: InstanceListParams` - `account_id: string` Path param - `cursor?: string` Query param: `page` and `cursor` are mutually exclusive, use one or the other. - `date_end?: string` Query param: Accepts ISO 8601 with no timezone offsets and in UTC. - `date_start?: string` Query param: Accepts ISO 8601 with no timezone offsets and in UTC. - `direction?: "asc" | "desc"` Query param: should only be used when `cursor` is used, defines a new direction for the cursor - `"asc"` - `"desc"` - `page?: number` Query param: `page` and `cursor` are mutually exclusive, use one or the other. - `per_page?: number` Query param - `status?: "queued" | "running" | "paused" | 5 more` Query param - `"queued"` - `"running"` - `"paused"` - `"errored"` - `"terminated"` - `"complete"` - `"waitingForPause"` - `"waiting"` ### Returns - `InstanceListResponse` - `id: string` - `created_on: string` - `ended_on: string | null` - `modified_on: string` - `started_on: string | null` - `status: "queued" | "running" | "paused" | 5 more` - `"queued"` - `"running"` - `"paused"` - `"errored"` - `"terminated"` - `"complete"` - `"waitingForPause"` - `"waiting"` - `version_id: string` - `workflow_id: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const instanceListResponse of client.workflows.instances.list('x', { account_id: 'account_id', })) { console.log(instanceListResponse.id); } ``` #### Response ```json { "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 } } ```