New: build custom CDF applications with Cognite Flows. Documentation · What's new.
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>",
"tasks": [
{
"externalId": "<string>",
"type": "function",
"parameters": {
"function": {
"externalId": "my.known.id",
"data": {
"key1": "value1",
"key2": "value2"
}
},
"isAsyncComplete": false
},
"name": "<string>",
"description": "<string>",
"retries": 3,
"timeout": 3600,
"onFailure": "abortWorkflow",
"dependsOn": [
{
"externalId": "my.known.id"
}
],
"lineageAnnotation": {
"sources": [
{
"uri": "cdf://westeurope-1/my-project/domain/my-domain/raw/sensors/readings"
}
],
"targets": [
{
"uri": "cdf://westeurope-1/my-project/domain/my-domain/raw/sensors/readings"
}
]
}
}
],
"description": "<string>"
},
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000
}Required capabilities:
workflowOrchestrationACL:READ
Retrieve a version of a given workflow.
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>",
"tasks": [
{
"externalId": "<string>",
"type": "function",
"parameters": {
"function": {
"externalId": "my.known.id",
"data": {
"key1": "value1",
"key2": "value2"
}
},
"isAsyncComplete": false
},
"name": "<string>",
"description": "<string>",
"retries": 3,
"timeout": 3600,
"onFailure": "abortWorkflow",
"dependsOn": [
{
"externalId": "my.known.id"
}
],
"lineageAnnotation": {
"sources": [
{
"uri": "cdf://westeurope-1/my-project/domain/my-domain/raw/sensors/readings"
}
],
"targets": [
{
"uri": "cdf://westeurope-1/my-project/domain/my-domain/raw/sensors/readings"
}
]
}
}
],
"description": "<string>"
},
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000
}Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Identifier for a workflow. Must be unique for the project. No trailing or leading whitespace and no null characters allowed.
255Identifier for a version. Must be unique for the workflow. No trailing or leading whitespace and no null characters allowed.
255Specific version of a workflow
Identifier for a workflow. Must be unique for the project. No trailing or leading whitespace and no null characters allowed.
255Identifier for a version. Must be unique for the workflow. No trailing or leading whitespace and no null characters allowed.
255Show child attributes
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Was this page helpful?