List assets

List all assets, or only the assets matching the specified query.

Request throttling

This endpoint is meant for data analytics/exploration usage and is not suitable for high load data retrieval usage. It is a subject of the new throttling schema (limited request rate and concurrency). Please check Assets resource description for more information.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

Limits the number of results to be returned. The maximum results returned by the server is 1000 even if you specify a higher limit.

cursor
string

Cursor for paging through results.

Example: cursor=4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo
includeMetadata
boolean
Default: true

Whether the metadata field should be returned or not.

name
string (AssetName) [ 1 .. 140 ] characters

The name of the asset.

parentIds
string <jsonArray(int64)> (JsonArrayInt64)

List only assets that have one of the parentIds as a parent. The parentId for root assets is null.

Example: parentIds=[363848954441724, 793045462540095, 1261042166839739]
parentExternalIds
string <jsonArray(string)> (JsonArrayString)

List only assets that have one of the parentExternalIds as a parent. The parentId for root assets is null.

Example: parentExternalIds=[externalId_1, externalId_2, externalId_3]
rootIds
string <jsonArray(int64)> (JsonArrayInt64)
Deprecated

This parameter is deprecated. Use assetSubtreeIds instead. List only assets that have one of the rootIds as a root asset. A root asset is its own root asset.

Example: rootIds=[363848954441724, 793045462540095, 1261042166839739]
assetSubtreeIds
string <jsonArray(int64)> (JsonArrayInt64)

List only assets that are in a subtree rooted at any of these assetIds (including the roots given). If the total size of the given subtrees exceeds 100,000 assets, an error will be returned.

Example: assetSubtreeIds=[363848954441724, 793045462540095, 1261042166839739]
assetSubtreeExternalIds
string <jsonArray(string)> (JsonArrayString)

List only assets that are in a subtree rooted at any of these assetExternalIds. If the total size of the given subtrees exceeds 100,000 assets, an error will be returned.

Example: assetSubtreeExternalIds=[externalId_1, externalId_2, externalId_3]
source
string <= 128 characters

The source of the asset, for example which database it's from.

root
boolean
Default: false

Whether the filtered assets are root assets, or not. Set to True to only list root assets.

minCreatedTime
integer <int64> (EpochTimestamp) >= 0

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Example: minCreatedTime=1730204346000
maxCreatedTime
integer <int64> (EpochTimestamp) >= 0

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Example: maxCreatedTime=1730204346000
minLastUpdatedTime
integer <int64> (EpochTimestamp) >= 0

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Example: minLastUpdatedTime=1730204346000
maxLastUpdatedTime
integer <int64> (EpochTimestamp) >= 0

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Example: maxLastUpdatedTime=1730204346000
externalIdPrefix
string (CogniteExternalIdPrefix) <= 255 characters

Filter by this (case-sensitive) prefix for the external ID.

Example: externalIdPrefix=my.known.prefix
partition
string

Splits the data set into N partitions. The attribute is specified as a "M/N" string, where M is a natural number in the interval of [1, N]. You need to follow the cursors within each partition in order to receive all the data.

The maximum number of allowed partitions (N) is 10.

Cognite rejects requests if you specify more than 10 partitions. When Cognite enforces this behavior, the requests result in a 400 Bad Request status.

Example: partition=1/3
Responses
200

Paged response with list of assets.

400

The response for a bad request.

429

The response for too many requests (concurrency or rate throttling).

get/assets
Request samples
const assets = await client.assets.list({ filter: { name: '21PT1019' } });
Response samples
application/json
{
  • "items": [
    • {
      }
    ],
  • "nextCursor": "string"
}