Cognite Datasets API
Data sets let you document and track data lineage, ensure data integrity, and allow 3rd parties to write their insights securely back to a Cognite Data Fusion (CDF) project.
Data sets let you document and track data lineage, ensure data integrity, and allow 3rd parties to write their insights securely back to a Cognite Data Fusion (CDF) project.
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-datasets-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 Data sets 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: Datasets
description: Data sets let you document and track data lineage, ensure data integrity, and allow 3rd parties to write their insights securely back to a Cognite Data Fusion (CDF) project.
paths:
/datasets:
post:
tags:
- Datasets
summary: Create data sets
description: '> **Required capabilities:** `datasetsAcl:WRITE`
You can create a maximum of 10 data sets per request.'
operationId: createDataSets
requestBody:
description: List of the data sets to create.
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetSpecList'
required: true
x-capability:
- datasetsAcl:WRITE
responses:
'200':
$ref: '#/components/responses/DataSetListResponse'
'400':
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: JavaScript
label: JavaScript SDK
source: "const datasets = [\n { externalId: 'sensitiveData' },\n { writeProtected: true }\n];\nconst createdDatasets = await client.datasets.create(datasets);"
- lang: Python
label: Python SDK
source: 'from cognite.client.data_classes import DataSetWrite
data_sets = [DataSetWrite(name="1st level"), DataSetWrite(name="2nd level")]
res = client.data_sets.create(data_sets)
'
- lang: Java
label: Java SDK
source: "List<DataSet> upsertDataSetList = List.of(DataSet.newBuilder() \n .setExternalId(\"10\") \n .setName(\"generated-\") \n .setDescription(\"Generated description\") \n .putMetadata(\"type\", \"sdk-data-generator\") \n .putMetadata(\"source\", \"sdk-data-generator\") \n .build()); \n\nList<DataSet> upsertDataSetsResults = \n client.datasets().upsert(upsertDataSetList); \n\n"
/datasets/list:
post:
tags:
- Datasets
summary: Filter data sets
description: '> **Required capabilities:** `datasetsAcl:READ`
Use advanced filtering options to find data sets.'
operationId: listDataSets
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetFilterRequest'
x-capability:
- datasetsAcl:READ
responses:
'200':
$ref: '#/components/responses/DataSetFilterResponse'
'400':
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: JavaScript
label: JavaScript SDK
source: 'const dataSets = await client.datasets.list({ filter: { createdTime: { min: new Date(''1 jan 2018''), max: new Date(''1 jan 2019'') }}});'
- lang: Python
label: Python SDK
source: "data_sets_list = client.data_sets.list(limit=5, write_protected=False)\n\nfor data_set in client.data_sets:\n data_set # do something with the data_set\n\nfor data_set_list in client.data_sets(chunk_size=2500):\n data_set_list # do something with the list\n"
- lang: Java
label: Java SDK
source: "List<DataSet> listDataSetsResults = new ArrayList<>(); \nclient.datasets() \n .list(Request.create()) \n .forEachRemaining(batch -> listDataSetsResults.addAll(batch)); \n\n"
/datasets/aggregate:
post:
tags:
- Datasets
summary: Aggregate data sets
description: '> **Required capabilities:** `datasetsAcl:READ`
Aggregate data sets in the same project. Criteria can be applied to select a subset of data sets.'
operationId: aggregateDataSets
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetAggregateRequest'
responses:
'200':
$ref: '#/components/responses/DataSetAggregateResponse'
'400':
$ref: '#/components/responses/ErrorResponse'
x-capability:
- datasetsAcl:READ
x-code-samples:
- lang: JavaScript
label: JavaScript SDK
source: 'const aggregates = await client.datasets.aggregate({ filter: { writeProtected: true } });
console.log(''Number of write protected datasets: '', aggregates[0].count)'
- lang: Python
label: Python SDK
source: 'aggregate_protected = client.data_sets.aggregate(filter={"write_protected": True})
'
- lang: Java
label: Java SDK
source: "Aggregate aggregate = client \n .datasets() \n .aggregate(Request.create() \n .withFilterParameter(\"source\",\"sdk-data-generator\")); \n\n"
/datasets/byids:
post:
tags:
- Datasets
summary: Retrieve data sets
description: '> **Required capabilities:** `datasetsAcl:READ`
Retrieve data sets by IDs or external IDs.'
operationId: getDataSets
requestBody:
description: List of the IDs of the data sets to retrieve. You can retrieve a maximum of 1000 data sets per request. All IDs must be unique.
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetIdEitherList'
x-capability:
- datasetsAcl:READ
responses:
'200':
$ref: '#/components/responses/DataSetListResponse'
'400':
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: JavaScript
label: JavaScript SDK
source: 'const dataSets = await client.datasets.retrieve([{id: 123}, {externalId: ''abc''}]);'
- lang: Python
label: Python SDK
source: 'res = client.data_sets.retrieve(id=1)
res = client.data_sets.retrieve(external_id="1")
res = client.data_sets.retrieve_multiple(ids=[1, 2, 3])
res = client.data_sets.retrieve_multiple(external_ids=["abc", "def"], ignore_unknown_ids=True)
'
- lang: Java
label: Java SDK
source: "List<Item> retrieveByExternalIds = List.of(Item.newBuilder() \n .setExternalId(\"10\") \n .build()); \nList<DataSet> retrieveDataSetResults = client.datasets() \n .retrieve(retrieveByExternalIds);//by list of items \nList<DataSet> retrieveDataSetResults = client.datasets() \n .retrieve(\"10\", \"20\");//by varargs of String \n\nList<Item> retrieveByInternalIds = List.of(Item.newBuilder() \n .setId(10) \n .build()); \nList<DataSet> retrieveDataSetResults = client.datasets() \n .retrieve(retrieveByInternalIds);//by list of items \nList<DataSet> retrieveDataSetResults = client.datasets() \n .retrieve(10, 20);//by varargs of Long \n\n"
/datasets/update:
post:
tags:
- Datasets
summary: Update data sets
operationId: updateDataSets
requestBody:
description: All provided IDs and external IDs must be unique. Fields that are not included in the request, are not changed.
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetUpdateList'
required: true
x-capability:
- datasetsAcl:WRITE
responses:
'200':
$ref: '#/components/responses/DataSetListResponse'
'400':
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: JavaScript
label: JavaScript SDK
source: 'const dataSets = await client.datasets.update([{id: 123, update: {description: {set: ''New description''}}}]);'
- lang: Python
label: Python SDK
source: 'data_set = client.data_sets.retrieve(id=1)
data_set.description = "New description"
res = client.data_sets.update(data_set)
from cognite.client.data_classes import DataSetUpdate
my_update = DataSetUpdate(id=1).description.set("New description").metadata.remove(["key"])
res = client.data_sets.update(my_update)
'
- lang: Java
label: Java SDK
source: "List<DataSet> upsertDataSetList = //list of DataSet; \nList<DataSet> upsertDataSetsResults = \n client.datasets().upsert(upsertDataSetList); \n\n"
description: '> **Required capabilities:** `datasetsAcl:WRITE`'
components:
schemas:
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
DataSetSpec:
type: object
properties:
externalId:
$ref: '#/components/schemas/CogniteExternalId'
name:
description: The name of the data set.
minLength: 1
maxLength: 50
type: string
description:
description: The description of the data set.
minLength: 1
maxLength: 500
type: string
metadata:
$ref: '#/components/schemas/DataSetMetadata'
writeProtected:
default: false
type: boolean
description: To write data to a write-protected data set, you need to be a member of a group that has the "datasets:owner" action for the data set. To learn more about write-protected data sets, follow this [guide](https://docs.cognite.com/cdf/data_governance/concepts/datasets/#write-protection).
DataSetIdEitherList:
type: object
allOf:
- type: object
required:
- items
properties:
items:
type: array
minItems: 1
maxItems: 1000
uniqueItems: true
items:
$ref: '#/components/schemas/DataSetIdEither'
- $ref: '#/components/schemas/IgnoreUnknownIdsField'
DataSetSpecList:
type: object
required:
- items
properties:
items:
type: array
items:
$ref: '#/components/schemas/DataSetSpec'
minItems: 1
maxItems: 10
DataSetUpdateList:
type: object
required:
- items
properties:
items:
type: array
items:
$ref: '#/components/schemas/DataSetUpdate'
SetDataSetName:
type: object
title: set
required:
- set
properties:
set:
type: string
description: Set a new value for the string, or remove the value.
minLength: 1
maxLength: 50
Cursor:
type: object
properties:
cursor:
type: string
example: 4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo
description: 'Cursor for paging through results. In general, if a response contains a `nextCursor`
property, it means that there may be more results, and you should pass that value as the
`cursor` parameter in the next request.
Note that the cursor may or may not be encrypted, but either way, it is not intended to be
decoded. Its internal structure is not a part of the public API, and may change without
notice. You should treat it as an opaque string and not attempt to craft your own cursors.
'
DataSetInternalId:
type: object
title: DataSetInternalId
required:
- id
properties:
id:
$ref: '#/components/schemas/CogniteInternalId'
DataSetAggregate:
description: Aggregation group of data sets
type: object
required:
- count
properties:
count:
type: integer
description: Size of the aggregation group
format: int64
SetStringField:
type: object
title: set
required:
- set
properties:
set:
type: string
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
ObjectPatchDataSet:
type: object
description: 'Custom, application specific metadata. String key -> String value. Limits of updated asset: Maximum length of key is 128 bytes, value 10240 bytes, up to 256 key-value pairs, of total size at most 10240.'
oneOf:
- $ref: '#/components/schemas/ObjectPatchSetDataSet'
- $ref: '#/components/schemas/ObjectPatchAddRemoveDataSet'
ObjectPatchAddRemoveDataSet:
title: add/remove
type: object
properties:
add:
uniqueItems: true
type: object
description: Add the key-value pairs. Values for existing keys will be overwritten.
additionalProperties:
type: string
maxLength: 10240
x-maxKeyLength: 128
x-maxTotalSize: 10240
maxProperties: 256
example:
key1: value1
key2: value2
remove:
uniqueItems: true
type: array
description: Remove the key-value pairs with the specified keys.
example:
- value1
- value2
items:
type: string
DataSetChangeByExternalId:
allOf:
- $ref: '#/components/schemas/DataSetPatch'
- type: object
required:
- externalId
properties:
externalId:
$ref: '#/components/schemas/CogniteExternalId'
SinglePatchDataSetDescription:
title: set
type: object
oneOf:
- $ref: '#/components/schemas/SetDataSetDescription'
- $ref: '#/components/schemas/RemoveField'
CogniteExternalIdPrefix:
description: Filter by this (case-sensitive) prefix for the external ID.
type: string
maxLength: 255
example: my.known.prefix
SinglePatchString:
title: set
type: object
oneOf:
- $ref: '#/components/schemas/SetStringField'
- $ref: '#/components/schemas/RemoveField'
description: Set a new value for the string, or remove the value.
IgnoreUnknownIdsField:
type: object
properties:
ignoreUnknownIds:
description: Ignore IDs and external IDs that are not found
type: boolean
default: false
ObjectPatchSetDataSet:
title: set
type: object
required:
- set
properties:
set:
uniqueItems: true
type: object
description: Set the key-value pairs. All existing key-value pairs will be removed.
additionalProperties:
type: string
maxLength: 10240
x-maxKeyLength: 128
x-maxTotalSize: 10240
maxProperties: 256
example:
key1: value1
key2: value2
DataSetExternalId:
type: object
title: DataSetExternalId
required:
- externalId
properties:
externalId:
$ref: '#/components/schemas/CogniteExternalId'
DataSetPatch:
type: object
description: Update applied to single data set
required:
- update
properties:
update:
type: object
properties:
externalId:
$ref: '#/components/schemas/SinglePatchString'
name:
$ref: '#/components/schemas/SinglePatchDataSetName'
description:
$ref: '#/components/schemas/SinglePatchDataSetDescription'
metadata:
$ref: '#/components/schemas/ObjectPatchDataSet'
writeProtected:
$ref: '#/components/schemas/SinglePatchBoolean'
SetDataSetDescription:
type: object
title: set
required:
- set
properties:
set:
type: string
description: Set a new value for the string, or remove the value.
minLength: 1
maxLength: 500
DataSetListWithCursor:
type: object
allOf:
- $ref: '#/components/schemas/DataSetList'
- type: object
properties:
nextCursor:
type: string
description: The cursor to get the next page of results (if available).
DataSetList:
type: object
required:
- items
properties:
items:
type: array
items:
$ref: '#/components/schemas/DataSet'
CogniteInternalId:
description: A server-generated ID for the object.
type: integer
minimum: 1
maximum: 9007199254740991
format: int64
DataSet:
allOf:
- $ref: '#/components/schemas/DataSetSpec'
- type: object
required:
- id
- createdTime
- lastUpdatedTime
- writeProtected
properties:
id:
$ref: '#/components/schemas/CogniteInternalId'
createdTime:
$ref: '#/components/schemas/EpochTimestamp'
lastUpdatedTime:
$ref: '#/components/schemas/EpochTimestamp'
EpochTimestampRange:
description: Range between two timestamps (inclusive).
type: object
properties:
max:
description: Maximum timestamp (inclusive). The timestamp is represented as number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
type: integer
minimum: 0
format: int64
min:
description: Minimum timestamp (inclusive). The timestamp is represented as number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
type: integer
minimum: 0
format: int64
CogniteExternalId:
description: The external ID provided by the client. Must be unique for the resource type.
type: string
maxLength: 255
example: my.known.id
DataSetIdEither:
oneOf:
- $ref: '#/components/schemas/DataSetInternalId'
- $ref: '#/components/schemas/DataSetExternalId'
SinglePatchBoolean:
type: object
title: set
required:
- set
properties:
set:
type: boolean
RemoveField:
title: remove
type: object
required:
- setNull
properties:
setNull:
type: boolean
example: true
DataSetFilter:
description: Filter on data sets with strict matching.
type: object
properties:
metadata:
$ref: '#/components/schemas/DataSetMetadata'
createdTime:
$ref: '#/components/schemas/EpochTimestampRange'
lastUpdatedTime:
$ref: '#/components/schemas/EpochTimestampRange'
externalIdPrefix:
$ref: '#/components/schemas/CogniteExternalIdPrefix'
writeProtected:
type: boolean
SinglePatchDataSetName:
title: set
type: object
oneOf:
- $ref: '#/components/schemas/SetDataSetName'
- $ref: '#/components/schemas/RemoveField'
DataSetChangeById:
allOf:
- $ref: '#/components/schemas/DataSetPatch'
- type: object
required:
- id
properties:
id:
$ref: '#/components/schemas/CogniteInternalId'
DataSetMetadata:
type: object
description: 'Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 128 bytes, value 10240 bytes, up to 256 key-value pairs, of total size at most 10240.'
additionalProperties:
type: string
maxLength: 10240
x-maxKeyLength: 128
x-maxTotalSize: 10240
maxProperties: 256
DataSetAggregateRequest:
description: Aggregation request of data sets. Filters exact field matching or timestamp ranges inclusive min and max.
allOf:
- type: object
properties:
filter:
$ref: '#/components/schemas/DataSetFilter'
DataDataSetAggregate:
type: object
required:
- items
properties:
items:
type: array
minItems: 1
maxItems: 1
items:
$ref: '#/components/schemas/DataSetAggregate'
DataSetFilterRequest:
allOf:
- type: object
properties:
filter:
$ref: '#/components/schemas/DataSetFilter'
limit:
description: Limits the number of results to return.
type: integer
format: int32
minimum: 1
maximum: 1000
default: 100
- $ref: '#/components/schemas/Cursor'
DataSetUpdate:
oneOf:
- $ref: '#/components/schemas/DataSetChangeById'
- $ref: '#/components/schemas/DataSetChangeByExternalId'
responses:
DataSetFilterResponse:
description: A list of data sets.
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetListWithCursor'
ErrorResponse:
description: The response for a failed request.
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/Error'
DataSetListResponse:
description: A list of data sets.
content:
application/json:
schema:
$ref: '#/components/schemas/DataSetList'
DataSetAggregateResponse:
description: Response with list of data set aggregations
content:
application/json:
schema:
$ref: '#/components/schemas/DataDataSetAggregate'
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:
- ''