const files = await client.files.list({filter: {mimeType: 'image/png'}});{
"items": [
{
"name": "<string>",
"id": 4503599627370496,
"uploaded": true,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"externalId": "my.known.id",
"directory": "<string>",
"source": "<string>",
"mimeType": "image/jpeg",
"metadata": {},
"assetIds": [
4503599627370496
],
"dataSetId": 4503599627370496,
"sourceCreatedTime": 1730204346000,
"sourceModifiedTime": 1730204346000,
"securityCategories": [
4503599627370496
],
"labels": [
{
"externalId": "my.known.id"
}
],
"geoLocation": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
123
]
},
"properties": {}
},
"uploadedTime": 1730204346000,
"instanceId": {
"space": "<string>",
"externalId": "<string>"
}
}
],
"nextCursor": "<string>"
}Required capabilities:
filesAcl:READ
The GET /files operation can be used to return information for all files in a project.
Optionally you can add one or more of the following query parameters. The filter query parameters will filter the results to only include files that match all filter parameters.
This endpoint is intended for data analytics and exploration purposes. It is not designed to support high-throughput data retrieval. Please note that this endpoint is subject to the new throttling policy, which imposes limits on both request rate and concurrency. For more details, please refer to the Files resource documentation.
const files = await client.files.list({filter: {mimeType: 'image/png'}});{
"items": [
{
"name": "<string>",
"id": 4503599627370496,
"uploaded": true,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"externalId": "my.known.id",
"directory": "<string>",
"source": "<string>",
"mimeType": "image/jpeg",
"metadata": {},
"assetIds": [
4503599627370496
],
"dataSetId": 4503599627370496,
"sourceCreatedTime": 1730204346000,
"sourceModifiedTime": 1730204346000,
"securityCategories": [
4503599627370496
],
"labels": [
{
"externalId": "my.known.id"
}
],
"geoLocation": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
123
]
},
"properties": {}
},
"uploadedTime": 1730204346000,
"instanceId": {
"space": "<string>",
"externalId": "<string>"
}
}
],
"nextCursor": "<string>"
}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.
Limits the number of results to be returned. The maximum results returned by the server is 1000 even if you specify a higher limit.
1 <= x <= 1000Cursor 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.
"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
Name of the file.
256File type. E.g. text/plain, application/pdf, ..
256"image/jpeg"
The source of the file.
128Only include files that reference these specific asset IDs.
1 - 100 elementsA server-generated ID for the object.
1 <= x <= 9007199254740991[
363848954441724,
793045462540095,
1261042166839739
]Asset external IDs of related equipment that this file relates to. Takes 1..100 unique items.
Show child attributes
Only include files that have a related asset in a tree rooted at any of these root assetIds.
"[1238712837, 238712361376, 23786237623]"
Only include files that have a related asset 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.
"[1238712837, 238712361376, 23786237623]"
Only include files that have a related asset in a subtree rooted at any of these assetExternalIds (including the roots given). If the total size of the given subtrees exceeds 100,000 assets, an error will be returned.
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Include files that have sourceCreatedTime set and with minimum this value. The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Include files that have sourceCreatedTime set and with maximum this value. The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Include files that have sourceModifiedTime set and with minimum this value. The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Include files that have sourceModifiedTime set and with maximum this value. The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Filter by this (case-sensitive) prefix for the external ID.
255"my.known.prefix"
1 - 43^[a-zA-Z][a-zA-Z0-9_-]{0,41}[a-zA-Z0-9]?$Filter by this (case-sensitive) prefix for the external ID.
255"my.known.prefix"
Whether or not the actual file is uploaded. This field is returned only by the API, it has no effect in a post body.
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.
"1/3"
Was this page helpful?