Retrieve Workflows

async AsyncCogniteClient.workflows.retrieve(
external_id: str | SequenceNotStr[str],
ignore_unknown_ids: bool = False,
) Workflow | WorkflowList | None

Retrieve one or more workflows.

Parameters:
  • external_id (str | SequenceNotStr[str]) – Identifier (or sequence of identifiers) for a Workflow. Must be unique.

  • ignore_unknown_ids (bool) – When requesting multiple workflows, whether to ignore external IDs that are not found rather than throwing an exception.

Returns:

If a single external ID is specified: the requested workflow, or None if it does not exist. If several external IDs are specified: the requested workflows.

Return type:

Workflow | WorkflowList | None

Examples

Retrieve workflow with external ID “my_workflow”:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> workflow = client.workflows.retrieve("my_workflow")

Retrieve multiple workflows:

>>> workflow_list = client.workflows.retrieve(["foo", "bar"])