Required capabilities:
workflowOrchestrationACL:READ
List workflow versions matching a given filter.
List of workflow versions
{- "filter": {
- "workflowFilters": [
- {
- "externalId": "string",
- "version": "string"
}
]
}, - "limit": 100,
- "cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}{- "items": [
- {
- "workflowExternalId": "string",
- "version": "string",
- "workflowDefinition": {
- "hash": "string",
- "description": "string",
- "tasks": [
- {
- "externalId": "string",
- "type": "function",
- "name": "string",
- "description": "string",
- "parameters": {
- "function": {
- "externalId": null,
- "data": null
}, - "isAsyncComplete": false
}, - "retries": 3,
- "timeout": 3600,
- "onFailure": "abortWorkflow",
- "dependsOn": [
- {
- "externalId": null
}
]
}
]
}, - "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000
}
], - "nextCursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}Required capabilities:
workflowOrchestrationACL:WRITE
Create or update a workflow version. Limited to a single workflow version per request.
Array of objects = 1 items |
Workflow version created/updated
{- "items": [
- {
- "workflowExternalId": "string",
- "version": "string",
- "workflowDefinition": {
- "description": "string",
- "tasks": [
- {
- "externalId": "string",
- "type": "function",
- "name": "string",
- "description": "string",
- "parameters": {
- "function": {
- "externalId": null,
- "data": null
}, - "isAsyncComplete": false
}, - "retries": 3,
- "timeout": 3600,
- "onFailure": "abortWorkflow",
- "dependsOn": [
- {
- "externalId": null
}
]
}
]
}
}
]
}{- "items": [
- {
- "workflowExternalId": "string",
- "version": "string",
- "workflowDefinition": {
- "hash": "string",
- "description": "string",
- "tasks": [
- {
- "externalId": "string",
- "type": "function",
- "name": "string",
- "description": "string",
- "parameters": {
- "function": {
- "externalId": null,
- "data": null
}, - "isAsyncComplete": false
}, - "retries": 3,
- "timeout": 3600,
- "onFailure": "abortWorkflow",
- "dependsOn": [
- {
- "externalId": null
}
]
}
]
}, - "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000,
- "warnings": [
- "string"
]
}
]
}Required capabilities:
workflowOrchestrationACL:READ
Retrieve a version of a given workflow.
Specific version of a workflow
The response for a failed request.
from cognite.client.data_classes import WorkflowVersionId res = client.workflows.versions.retrieve(WorkflowVersionId("my_workflow", "v1")) res = client.workflows.versions.retrieve( [WorkflowVersionId("my_workflow", "v1"), WorkflowVersionId("other", "v3.2")], ignore_unknown_ids=True, ) res = client.workflows.versions.retrieve([("my_workflow", "v1"), ("other", "v3.2")]) res = client.workflows.versions.retrieve("my_workflow", "v1")
{- "workflowExternalId": "string",
- "version": "string",
- "workflowDefinition": {
- "hash": "string",
- "description": "string",
- "tasks": [
- {
- "externalId": "string",
- "type": "function",
- "name": "string",
- "description": "string",
- "parameters": {
- "function": {
- "externalId": "my.known.id",
- "data": {
- "key1": "value1",
- "key2": "value2"
}
}, - "isAsyncComplete": false
}, - "retries": 3,
- "timeout": 3600,
- "onFailure": "abortWorkflow",
- "dependsOn": [
- {
- "externalId": "my.known.id"
}
]
}
]
}, - "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000
}Required capabilities:
workflowOrchestrationACL:WRITE
Delete specific versions of one or more workflows.
Empty response.
The response for a failed request.
{- "items": [
- {
- "version": "string",
- "workflowExternalId": "string"
}
]
}{ }