## List of workflow instances `workflows.instances.list(strworkflow_name, InstanceListParams**kwargs) -> SyncV4PagePaginationArray[InstanceListResponse]` **get** `/accounts/{account_id}/workflows/{workflow_name}/instances` Lists all instances of a workflow with their execution status. ### Parameters - `account_id: str` - `workflow_name: str` - `cursor: Optional[str]` `page` and `cursor` are mutually exclusive, use one or the other. - `date_end: Optional[Union[str, datetime]]` Accepts ISO 8601 with no timezone offsets and in UTC. - `date_start: Optional[Union[str, datetime]]` Accepts ISO 8601 with no timezone offsets and in UTC. - `direction: Optional[Literal["asc", "desc"]]` should only be used when `cursor` is used, defines a new direction for the cursor - `"asc"` - `"desc"` - `page: Optional[float]` `page` and `cursor` are mutually exclusive, use one or the other. - `per_page: Optional[float]` - `status: Optional[Literal["queued", "running", "paused", 5 more]]` - `"queued"` - `"running"` - `"paused"` - `"errored"` - `"terminated"` - `"complete"` - `"waitingForPause"` - `"waiting"` ### Returns - `class InstanceListResponse: …` - `id: str` - `created_on: datetime` - `ended_on: Optional[datetime]` - `modified_on: datetime` - `started_on: Optional[datetime]` - `status: Literal["queued", "running", "paused", 5 more]` - `"queued"` - `"running"` - `"paused"` - `"errored"` - `"terminated"` - `"complete"` - `"waitingForPause"` - `"waiting"` - `version_id: str` - `workflow_id: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.workflows.instances.list( workflow_name="x", account_id="account_id", ) page = page.result[0] print(page.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 } } ```