Skip to main content
GET
/
assets
JavaScript SDK
const assets = await client.assets.list({ filter: { name: '21PT1019' } });
{
  "items": [
    {
      "createdTime": 1730204346000,
      "lastUpdatedTime": 1730204346000,
      "rootId": 4503599627370496,
      "name": "<string>",
      "id": 4503599627370496,
      "aggregates": {
        "childCount": 1,
        "depth": 1,
        "path": [
          {
            "id": 4503599627370496
          }
        ]
      },
      "parentId": 4503599627370496,
      "parentExternalId": "my.known.id",
      "externalId": "my.known.id",
      "description": "<string>",
      "dataSetId": 4503599627370496,
      "metadata": {},
      "source": "<string>",
      "labels": [
        {
          "externalId": "my.known.id"
        }
      ],
      "geoLocation": {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            123
          ]
        },
        "properties": {}
      }
    }
  ],
  "nextCursor": "<string>"
}

Authorizations

Authorization
string
header
required

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.

Query Parameters

limit
integer
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.

Required range: 1 <= x <= 1000
cursor
string

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.

Example:

"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"

includeMetadata
boolean
default:true

Whether the metadata field should be returned or not.

name
string

The name of the asset.

Required string length: 1 - 140
parentIds
string<jsonArray(int64)>

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

Example:

"[1238712837, 238712361376, 23786237623]"

parentExternalIds
string<jsonArray(string)>

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

rootIds
string<jsonArray(int64)>

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:

"[1238712837, 238712361376, 23786237623]"

assetSubtreeIds
string<jsonArray(int64)>

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:

"[1238712837, 238712361376, 23786237623]"

assetSubtreeExternalIds
string<jsonArray(string)>

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.

source
string

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

Maximum string length: 128
root
boolean
default:false

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

minCreatedTime
integer<int64>

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

Required range: x >= 0
Example:

1730204346000

maxCreatedTime
integer<int64>

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

Required range: x >= 0
Example:

1730204346000

minLastUpdatedTime
integer<int64>

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

Required range: x >= 0
Example:

1730204346000

maxLastUpdatedTime
integer<int64>

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

Required range: x >= 0
Example:

1730204346000

externalIdPrefix
string

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

Maximum string length: 255
Example:

"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:

"1/3"

Response

Paged response with list of assets.

A list of objects along with possible cursors to get the next or previous page of results.

items
object[]
required
nextCursor
string

The cursor to get the next page of results (if available).

Last modified on April 23, 2026