Delete Workflow Versions

async AsyncCogniteClient.workflows.versions.delete(
workflow_version_id: WorkflowVersionIdentifier | MutableSequence[WorkflowVersionId] | MutableSequence[tuple[str, str]],
ignore_unknown_ids: bool = False,
) None

Delete a workflow version(s).

Parameters:
  • workflow_version_id (WorkflowVersionIdentifier | MutableSequence[WorkflowVersionId] | MutableSequence[tuple[str, str]]) – Workflow version id or list of workflow version ids to delete.

  • ignore_unknown_ids (bool) – Ignore external ids that are not found rather than throw an exception.

Examples

Delete workflow version “1” of workflow “my workflow” specified by using a tuple:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> client.workflows.versions.delete(("my workflow", "1"))

Delete workflow version “1” of workflow “my workflow” and workflow version “2” of workflow “my workflow 2” using the WorkflowVersionId class:

>>> from cognite.client.data_classes import WorkflowVersionId
>>> client.workflows.versions.delete(
...     [WorkflowVersionId("my workflow", "1"), WorkflowVersionId("my workflow 2", "2")]
... )