Workflow versions

Filter workflow versions

Required capabilities: workflowOrchestrationACL:READ

List workflow versions matching a given filter.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
required
object (ListVersionsFilter)
limit
integer (limit) [ 1 .. 1000 ]

The maximum number of results to return.

cursor
string (cursor)

Cursor to use for paging through results. This cursor is returned in the response of a previous request as nextCursor. If not specified, start from the first page of results.

Responses
200

List of workflow versions

post/workflows/versions/list
Request samples
application/json
{
  • "filter": {
    },
  • "limit": 100,
  • "cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}
Response samples
application/json
{
  • "items": [
    ],
  • "nextCursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}

Create or update a workflow version

Required capabilities: workflowOrchestrationACL:WRITE

Create or update a workflow version. Limited to a single workflow version per request.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
required
Array of objects = 1 items
Responses
200

Workflow version created/updated

post/workflows/versions
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Retrieve a workflow version

Required capabilities: workflowOrchestrationACL:READ

Retrieve a version of a given workflow.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
workflowExternalId
required
string (WorkflowExternalId) <= 255 characters

Identifier for a workflow. Must be unique for the project. No trailing or leading whitespace and no null characters allowed.

version
required
string (Version) <= 255 characters

Identifier for a version. Must be unique for the workflow. No trailing or leading whitespace and no null characters allowed.

Responses
200

Specific version of a workflow

404

The response for a failed request.

get/workflows/{workflowExternalId}/versions/{version}
Request samples
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")
Response samples
application/json
{
  • "workflowExternalId": "string",
  • "version": "string",
  • "workflowDefinition": {
    },
  • "createdTime": 1730204346000,
  • "lastUpdatedTime": 1730204346000
}

Delete workflow versions

Required capabilities: workflowOrchestrationACL:WRITE

Delete specific versions of one or more workflows.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
query Parameters
ignoreUnknownIds
boolean
Default: true

If true, ignore unknown version ids. If false, a 404 Not Found error is returned and none of the versions are deleted if any of the version ids are unknown.

Request Body schema: application/json
required
Array of objects [ 1 .. 100 ] items
Responses
200

Empty response.

404

The response for a failed request.

post/workflows/versions/delete
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{ }