List Workflow Executions
- async AsyncCogniteClient.workflows.executions.list(
- workflow_version_ids: WorkflowVersionIdentifier | MutableSequence[WorkflowVersionIdentifier] | None = None,
- created_time_start: int | None = None,
- created_time_end: int | None = None,
- statuses: WorkflowStatus | MutableSequence[WorkflowStatus] | None = None,
- limit: int | None = 25,
List workflow executions in the project.
- Parameters:
workflow_version_ids (WorkflowVersionIdentifier | MutableSequence[WorkflowVersionIdentifier] | None) – Workflow version id or list of workflow version ids to filter on.
created_time_start (int | None) – Filter out executions that was created before this time. Time is in milliseconds since epoch.
created_time_end (int | None) – Filter out executions that was created after this time. Time is in milliseconds since epoch.
statuses (WorkflowStatus | MutableSequence[WorkflowStatus] | None) – Workflow status or list of workflow statuses to filter on.
limit (int | None) – Maximum number of results to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
- Returns:
The requested workflow executions.
- Return type:
Examples
Get all workflow executions for workflows ‘my_workflow’ version ‘1’:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.workflows.executions.list(("my_workflow", "1"))
Get all workflow executions from the last 24 hours:
>>> from cognite.client.utils import timestamp_to_ms >>> res = client.workflows.executions.list(created_time_start=timestamp_to_ms("1d-ago"))