Cognite Workflow versions API
The Workflow versions API from Cognite — 4 operation(s) for workflow versions.
The Workflow versions API from Cognite — 4 operation(s) for workflow versions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cognite-workflow-versions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cognite Workflow versions API
description: '# Introduction
This is the reference documentation for the Cognite API with
an overview of all the available methods.'
version: v1
contact:
name: Cognite Support
url: https://support.cognite.com
email: support@cognite.com
servers:
- url: https://{cluster}.cognitedata.com/api/v1/projects/{project}
description: The URL for the CDF cluster to connect to
variables:
cluster:
enum:
- api
- az-tyo-gp-001
- az-eastus-1
- az-power-no-northeurope
- westeurope-1
- asia-northeast1-1
- gc-dsm-gp-001
default: api
description: The CDF cluster to connect to
project:
default: publicdata
description: The CDF project name.
security:
- oidc-token:
- https://{cluster}.cognitedata.com/.default
- oauth2-client-credentials:
- https://{cluster}.cognitedata.com/.default
- oauth2-open-industrial-data:
- https://api.cognitedata.com/.default
- oauth2-auth-code:
- https://{cluster}.cognitedata.com/.default
tags:
- name: Workflow Versions
paths:
/workflows/versions/list:
post:
operationId: ListWorkflowVersions
summary: Filter workflow versions
description: '> **Required capabilities:** `workflowOrchestrationACL:READ`
List workflow versions matching a given filter.'
tags:
- Workflow Versions
x-capability:
- workflowOrchestrationACL:READ
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ListVersionsQuery'
responses:
'200':
description: List of workflow versions
content:
application/json:
schema:
properties:
items:
type: array
maxItems: 1000
items:
$ref: '#/components/schemas/WorkflowVersionView'
nextCursor:
$ref: '#/components/schemas/nextCursor'
required:
- items
x-code-samples:
- lang: Python
label: Python SDK
source: "res = client.workflows.versions.list([\"my_workflow\", \"my_workflow_2\"])\n\nfrom cognite.client.data_classes import WorkflowVersionId\nres = client.workflows.versions.list(\n [WorkflowVersionId(\"my_workflow\"), WorkflowVersionId(\"my_workflow_2\")])\n\nres = client.workflows.versions.list(\n [(\"my_workflow\", \"1\"), (\"my_workflow_2\", \"2\")])\n"
/workflows/versions:
post:
operationId: CreateOrUpdateWorkflowVersion
summary: Create or update a workflow version
description: '> **Required capabilities:** `workflowOrchestrationACL:WRITE`
Create or update a workflow version. Limited to a single workflow version per request.'
tags:
- Workflow Versions
x-capability:
- workflowOrchestrationACL:WRITE
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
items:
type: array
minItems: 1
maxItems: 1
items:
type: object
properties:
workflowExternalId:
$ref: '#/components/schemas/WorkflowExternalId'
version:
$ref: '#/components/schemas/Version'
workflowDefinition:
$ref: '#/components/schemas/WorkflowDefinition'
required:
- workflowExternalId
- version
- workflowDefinition
responses:
'200':
description: Workflow version created/updated
content:
application/json:
schema:
type: object
properties:
items:
type: array
minItems: 1
maxItems: 1
items:
$ref: '#/components/schemas/WorkflowVersionView'
x-code-samples:
- lang: Python
label: Python SDK
source: "from cognite.client.data_classes import (\n WorkflowVersionUpsert, WorkflowDefinitionUpsert,\n WorkflowTask, FunctionTaskParameters,\n)\nfunction_task = WorkflowTask(\n external_id=\"my_workflow-task1\",\n parameters=FunctionTaskParameters(\n external_id=\"my_fn_xid\",\n data={\"a\": 1, \"b\": 2},\n ),\n)\nnew_version = WorkflowVersionUpsert(\n workflow_external_id=\"my_workflow\",\n version=\"1\",\n workflow_definition=WorkflowDefinitionUpsert(\n tasks=[function_task],\n description=\"This workflow has one step\",\n ),\n)\nres = client.workflows.versions.upsert(new_version)\n"
/workflows/{workflowExternalId}/versions/{version}:
parameters:
- name: workflowExternalId
in: path
required: true
schema:
$ref: '#/components/schemas/WorkflowExternalId'
- name: version
in: path
required: true
schema:
$ref: '#/components/schemas/Version'
get:
operationId: GetSpecificVersion
summary: Retrieve a workflow version
description: '> **Required capabilities:** `workflowOrchestrationACL:READ`
Retrieve a version of a given workflow.'
tags:
- Workflow Versions
x-capability:
- workflowOrchestrationACL:READ
responses:
'200':
description: Specific version of a workflow
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowVersionView'
'404':
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Python
label: Python SDK
source: "from cognite.client.data_classes import WorkflowVersionId\nres = client.workflows.versions.retrieve(WorkflowVersionId(\"my_workflow\", \"v1\"))\n\nres = client.workflows.versions.retrieve(\n [WorkflowVersionId(\"my_workflow\", \"v1\"), WorkflowVersionId(\"other\", \"v3.2\")],\n ignore_unknown_ids=True,\n)\nres = client.workflows.versions.retrieve([(\"my_workflow\", \"v1\"), (\"other\", \"v3.2\")])\n\nres = client.workflows.versions.retrieve(\"my_workflow\", \"v1\")\n"
/workflows/versions/delete:
post:
operationId: DeleteSpecificVersionsOfWorkflow
summary: Delete workflow versions
description: '> **Required capabilities:** `workflowOrchestrationACL:WRITE`
Delete specific versions of one or more workflows.'
tags:
- Workflow Versions
x-capability:
- workflowOrchestrationACL:WRITE
parameters:
- name: ignoreUnknownIds
in: query
required: false
description: 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.
schema:
type: boolean
default: true
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
items:
type: array
minItems: 1
maxItems: 100
items:
type: object
properties:
version:
$ref: '#/components/schemas/Version'
workflowExternalId:
$ref: '#/components/schemas/WorkflowExternalId'
required:
- version
- workflowExternalId
responses:
'200':
$ref: '#/components/responses/EmptyResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Python
label: Python SDK
source: 'client.workflows.versions.delete(("my workflow", "1"))
from cognite.client.data_classes import WorkflowVersionId
client.workflows.versions.delete([WorkflowVersionId("my workflow", "1"), WorkflowVersionId("my workflow 2", "2")])
'
components:
schemas:
SimulatorInput:
type: object
properties:
referenceId:
type: string
description: Reference id of the value to override
value:
anyOf:
- type: string
maxLength: 1024
minLength: 1
- type: number
- items:
type: string
type: array
maxItems: 200
minItems: 1
- items:
type: number
type: array
maxItems: 200
minItems: 1
title: Value
description: Override the value used for a simulation run
unit:
description: Override the unit of the value
anyOf:
- $ref: '#/components/schemas/SimulatorInputsUnit'
- type: 'null'
required:
- referenceId
- value
Error:
type: object
required:
- code
- message
description: Cognite API error.
properties:
code:
type: integer
description: HTTP status code.
format: int32
example: 401
message:
type: string
description: Error message.
example: Could not authenticate.
missing:
type: array
description: List of lookup objects that do not match any results.
items:
type: object
additionalProperties: true
duplicated:
type: array
description: List of objects that are not unique.
items:
type: object
additionalProperties: true
TaskType:
type: string
enum:
- function
- transformation
- cdf
- dynamic
- subworkflow
- simulation
WorkflowVersionView:
title: Workflow Version
type: object
properties:
workflowExternalId:
$ref: '#/components/schemas/WorkflowExternalId'
version:
$ref: '#/components/schemas/Version'
workflowDefinition:
$ref: '#/components/schemas/WorkflowDefinitionResponse'
createdTime:
$ref: '#/components/schemas/EpochTimestamp'
lastUpdatedTime:
$ref: '#/components/schemas/EpochTimestamp'
TaskDefinition:
title: Task Definition
type: object
properties:
externalId:
$ref: '#/components/schemas/TaskExternalId'
type:
$ref: '#/components/schemas/TaskType'
name:
type: string
maxLength: 255
description: Readable name meant for use in UIs
description:
type: string
maxLength: 500
description: Description of the intention of the task
parameters:
oneOf:
- $ref: '#/components/schemas/FunctionTaskParameters'
- $ref: '#/components/schemas/TransformationTaskParameters'
- $ref: '#/components/schemas/CdfTaskParameters'
- $ref: '#/components/schemas/DynamicTaskParameters'
- $ref: '#/components/schemas/SubworkflowTaskParameters'
- $ref: '#/components/schemas/SimulatorTaskParameters'
retries:
type: number
default: 3
minimum: 0
maximum: 10
description: Number of times to retry the task if it fails. If set to 0, the task will not be retried. The behavior for timeouts and retries is defined by the `onFailure` parameter, refer to it for more information.
timeout:
type: number
default: 3600
minimum: 100
maximum: 43200
description: Timeout in seconds. After this time, the task will be marked as `TIMED_OUT`. By default, the task won't be retried upon timeout. Use the `onFailure` parameter to change this behavior.
onFailure:
type: string
enum:
- abortWorkflow
- skipTask
default: abortWorkflow
description: "Defines the policy to handle failures and timeouts.\n- `skipTask`: For both failures and timeouts, it will retry until the retries are exhausted. After that, the Task is marked as COMPLETED_WITH_ERRORS and the subsequent tasks are executed.\n- `abortWorkflow`:\n - In case of failures, retries will be performed until exhausted, after which the task is marked as FAILED and the Workflow is marked the same.\n - In the event of a timeout, no retries are undertaken; the task is marked as TIMED_OUT and the Workflow is marked as FAILED.\n"
dependsOn:
type: array
items:
$ref: '#/components/schemas/TaskDepends'
minItems: 0
maxItems: 100
description: The tasks that must be completed before this task can be executed.
required:
- externalId
- type
- parameters
TaskDepends:
type: object
properties:
externalId:
$ref: '#/components/schemas/CogniteExternalId'
required:
- externalId
SimulatorTaskParameters:
title: Simulation Task Parameters
type: object
description: Parameters for the Simulation run task type.
properties:
simulation:
type: object
properties:
routineExternalId:
description: The external id of the routine to be executed.
oneOf:
- $ref: '#/components/schemas/CogniteExternalId'
runTime:
anyOf:
- type: integer
- type: 'null'
title: RunTime
description: Run time in milliseconds. Reference timestamp used for data pre-processing and data sampling.
inputs:
type: array
maxItems: 200
minItems: 0
description: List of input overrides
items:
$ref: '#/components/schemas/SimulatorInput'
required:
- routineExternalId
cursor:
type: string
example: 4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo
description: 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.
Version:
type: string
description: Identifier for a version. Must be unique for the workflow. No trailing or leading whitespace and no null characters allowed.
maxLength: 255
limit:
type: integer
minimum: 1
maximum: 1000
default: 100
description: The maximum number of results to return.
TaskExternalId:
type: string
description: Identifier for the task. Must be unique within the version. No trailing or leading whitespace and no null characters allowed. Task external IDs cannot be exactly 'workflow' or start with '__' (double underscore) as these are reserved.
maxLength: 255
TransformationTaskParameters:
title: Transformation Task Parameters
type: object
properties:
transformation:
type: object
description: Parameters for the CDF Transformation task type.
properties:
externalId:
description: The external id of the Transformation in the project.
oneOf:
- $ref: '#/components/schemas/CogniteExternalId'
- $ref: '#/components/schemas/Reference'
concurrencyPolicy:
type: string
enum:
- fail
- waitForCurrent
- restartAfterCurrent
default: fail
description: 'Determines the behavior of the task if the Transformation is already running.
- fail: The task fails if another instance of the Transformation is currently running.
- waitForCurrent: The task will pause and wait for the already running Transformation to complete. Once completed, the task is completed. This mode is useful for preventing redundant Transformation runs.
- restartAfterCurrent: The task waits for the ongoing Transformation to finish. After completion, the task restarts the Transformation. This mode ensures that the most recent data can be used by following tasks.
'
useTransformationCredentials:
type: boolean
default: false
description: 'If set to `true`, the transformation will run using the client credentials configured on the transformation.
If set to `false`, the transformation will run using the client credentials used to trigger the workflow.
'
required:
- externalId
DynamicTaskParameters:
title: Dynamic Task Parameters
type: object
description: 'Dynamic tasks allow the dynamic creation of additional tasks during a workflow execution.
There are two things needed to execute a dynamic task.
- A list of task definitions (similar to the way tasks are defined in the workflow definition when creating a workflow version).
- A workflow task prior to the dynamic task that outputs the above list
Note: a dynamic task cannot start other dynamic tasks or subworkflows.
'
properties:
dynamic:
type: object
description: Tasks should reference a list of task definitions, defined exactly like they are during version creation.
properties:
tasks:
$ref: '#/components/schemas/Reference'
EpochTimestamp:
description: The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
type: integer
minimum: 0
format: int64
example: 1730204346000
SimulatorInputsUnit:
type: object
properties:
name:
type: string
description: Name of the unit.
CogniteExternalId:
description: The external ID provided by the client. Must be unique for the resource type.
type: string
maxLength: 255
example: my.known.id
FunctionTaskParameters:
title: Function Task Parameters
type: object
description: Parameters for the Cognite Function task type.
properties:
function:
type: object
properties:
externalId:
description: The external id of the Cognite Function in the project.
oneOf:
- $ref: '#/components/schemas/CogniteExternalId'
- $ref: '#/components/schemas/Reference'
data:
description: Input data that will be passed to the Cognite Function. Limited to 100KB in size.
oneOf:
- type: object
example:
key1: value1
key2: value2
maxLength: 100000
- $ref: '#/components/schemas/Reference'
required:
- externalId
isAsyncComplete:
type: boolean
default: false
description: "Defines if the execution of the task should be completed asynchronously.\n\n - If `false`, the status of the task will be set to `COMPLETED` when the Cognite Function call completes successfully.\\\n - If `true`, the task status will remain `IN_PROGRESS` even when the Cognite Function call completes successfully.\\\n It will then wait for an external process to update the task status directly using the task update endpoint.\\\n The task id required for the callback to update the task status is included in the input data of the Function with key \"cogniteOrchestrationTaskId\"."
nextCursor:
description: Cursor to get the next page of results. If not present, no more results are available.
type: string
example: 4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo
ListVersionsQuery:
type: object
properties:
filter:
$ref: '#/components/schemas/ListVersionsFilter'
limit:
$ref: '#/components/schemas/limit'
cursor:
$ref: '#/components/schemas/cursor'
CdfTaskParameters:
title: CDF Task Parameters
type: object
description: Parameters for the CDF Request task type, which can be used to make a request to any CDF API.
properties:
cdfRequest:
type: object
properties:
resourcePath:
description: 'The path of the request. The path should be prefixed by `{cluster}.cognitedata.com/api/v1/project/{project}` based on the relevant cluster and project.
Example: to list TimeSeries, the resourcePath would be `{cluster}.cognitedata.com/api/v1/project/{project}/timeseries/list`.
'
oneOf:
- type: string
maxLength: 128
- $ref: '#/components/schemas/Reference'
queryParameters:
oneOf:
- type: object
additionalProperties:
type: string
maxLength: 50
maxItems: 5
- $ref: '#/components/schemas/Reference'
method:
oneOf:
- type: string
enum:
- POST
- GET
- PUT
- $ref: '#/components/schemas/Reference'
body:
description: The body of the request. Limited to 100KB in size.
oneOf:
- type: object
maxLength: 100000
- $ref: '#/components/schemas/Reference'
requestTimeoutInMillis:
oneOf:
- type: number
default: 10000
minimum: 100
- $ref: '#/components/schemas/Reference'
cdfVersionHeader:
description: 'Optional CDF API version header. Set to `alpha` or `beta` to access alpha or beta CDF API endpoints.
'
type: string
enum:
- alpha
- beta
required:
- resourcePath
- method
ListVersionsFilter:
type: object
properties:
workflowFilters:
type: array
maxItems: 100
description: Allows filtering versions by their specific workflows (and optionally version identifiers). If no workflowFilters are specified, all versions for all workflows will be included, ordered by createdTime.
items:
$ref: '#/components/schemas/WorkflowFilter'
WorkflowExternalId:
type: string
description: Identifier for a workflow. Must be unique for the project. No trailing or leading whitespace and no null characters allowed.
maxLength: 255
WorkflowDefinitionResponse:
title: Workflow Definition
type: object
properties:
hash:
type: string
description:
type: string
maxLength: 500
tasks:
type: array
items:
$ref: '#/components/schemas/TaskDefinition'
required:
- hash
- tasks
Reference:
type: string
description: 'A Reference is an expression that allows dynamically injecting input to a task during execution. References can be used to reference the input of the Workflow, the output of a previous task in the Workflow, or the input of a previous task in the Workflow. Note that the injected value must be valid in the context of the property it is injected into.
Example Task reference: ${myTaskExternalId.output.someKey} Example Workflow input reference: ${workflow.input.myKey}'
WorkflowDefinition:
title: Workflow Definition
type: object
properties:
description:
type: string
maxLength: 500
tasks:
type: array
maxItems: 100
items:
$ref: '#/components/schemas/TaskDefinition'
required:
- tasks
WorkflowFilter:
type: object
description: If the version is not specified, all versions for the workflow will be included, ordered by createdTime.
properties:
externalId:
$ref: '#/components/schemas/WorkflowExternalId'
version:
$ref: '#/components/schemas/Version'
required:
- externalId
SubworkflowTaskParameters:
title: Subworkflow Task Parameters
type: object
properties:
subworkflow:
oneOf:
- type: object
properties:
tasks:
description: 'A list of tasks with their inputs and interdependencies. Similar to the way tasks are defined in a workflow definition.
Note: subworkflows cannot contain dynamic tasks or nested subworkflows
'
type: array
items:
$ref: '#/components/schemas/TaskDefinition'
maxItems: 100
minItems: 1
required:
- tasks
- type: object
description: 'Run another workflow embedded as a subworkflow. The tasks within the subworkflow will count towards the limit on total number of tasks in a workflow.
Note: the referenced subworkflow cannot contain dynamic tasks or nested subworkflows
'
properties:
workflowExternalId:
type: string
description: External ID of the referenced workflow
version:
type: string
description: Version of the referenced workflow
required:
- workflowExternalId
- version
responses:
EmptyResponse:
description: Empty response.
content:
application/json:
schema:
type: object
ErrorResponse:
description: The response for a failed request.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/Error'
securitySchemes:
oidc-token:
type: http
scheme: bearer
bearerFormat: OpenID Connect or OAuth2 token
description: 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.
oauth2-client-credentials:
type: oauth2
description: 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.
flows:
clientCredentials:
tokenUrl: https://your-idps.token.url/
scopes:
default: https://{cluster}.cognitedata.com/.default
oauth2-auth-code:
type: oauth2
description: 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.
flows:
authorizationCode:
authorizationUrl: https://your-idps.authorization.url/
tokenUrl: https://your-idps.token.url/
scopes:
default: https://{cluster}.cognitedata.com/.default
oauth2-open-industrial-data:
type: oauth2
description: Auth flow for Open Industrial Data. Get your client secret from https://hub.cognite.com/open-industrial-data-211.
flows:
clientCredentials:
tokenUrl: https://login.microsoftonline.com/48d5043c-cf70-4c49-881c-c638f5796997/oauth2/v2.0/token
scopes:
default: https://api.cognitedata.com/.default
org-oidc-token:
type: openIdConnect
openIdConnectUrl: https://auth.cognite.com/.well-known/openid-configuration
description: 'Access token issued by the Cognite authorization server, and valid for the target organization. The token must
be an OpenID Connect token, and it can be obtained by performing an OIDC login flow toward `auth.cognite.com`.
This is a single URL for all CDF organizations.'
x-tagGroups:
- name: Changelog
tags:
- Changelog
- name: Organizations and projects
tags:
- Organizations
- Projects
- name: Identity and access management
tags:
- Principals
- Groups
- Security categories
- Sessions
- Token
- User profiles
- Project Deletion Reporting
- name: Data modeling
tags:
- Data Modeling
- Data models
- Spaces
- Views
- Containers
- Nodes
- Instances
- Statistics
- Streams
- Records
- name: Asset-centric data model
tags:
- Assets
- Time series
- Synthetic Time Series
- Data point subscriptions
- Events
- Files
- Sequences
- Geospatial
- Seismic
- name: 3D
tags:
- 3D Models
- 3D Model Revisions
- 3D Files
- 3D Asset Mapping
- 3D Contextualization
- 3D Jobs
- 3D Migration
- 3D Scenes
- name: Contextualization
tags:
- Entity matching
- Entity matching pipelines
- Engineering diagrams
- Vision
- Advanced joins
- name: Cognite AI
tags:
- Agents
- Skills
- Chat Completions
- Document AI
- Models
- name: Documents
tags:
- Documents
- Document preview
- name: Data ingestion
tags:
- Raw
- Extraction Pipelines
- Extraction Pipelines Runs
- Extraction Pipelines Config
- Extractors
- name: Data organization
tags:
- Data sets
- Data domains
- Data products
- Rule sets
- Labels
- Relationships
- Annotations
- name: Transformations
tags:
- Transformations
- Transformation Jobs
- Transformation Schedules
- Transformation Notifications
- Query
- Schema
- name: Functions
tags:
- Functions
- Function calls
- Function schedules
- name: Hosted Extractors
tags:
- Sources
- Jobs
- Destinations
- Mappings
- name: PostgreSQL Gateway
tags:
- Postgres Gateway Users
- Postgres Gateway Tables
- name: SAP Writeback
tags:
- SAP Instances
- SAP Endpoints
- Schema Mappings
- Writeback Requests
- name: Data workflows
tags:
- Workflows
- Workflow versions
- Workflow executions
- Workflow triggers
- Tasks
- Workers
- name: Simulators
tags:
- Simulators
- Simulator Integrations
- Simulator Models
- Simulator Routines
- Simulation Runs
- Simulator Logs
- name: Units
tags:
- Units
- Unit Systems
- name: ''
tags:
- ''