Retrieve a file by its ID

Returns file info for the file ID

Request throttling

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.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
id
required
integer <int64> (CogniteInternalId) [ 1 .. 9007199254740991 ]

A server-generated ID for the object.

Responses
200

The response for a successful GET files/id operation

400

The response for a failed request.

get/files/{id}
Request samples
const files = await client.files.retrieve([{id: 123}, {externalId: 'abc'}]);
Response samples
application/json
{
  • "externalId": "my.known.id",
  • "name": "string",
  • "directory": "string",
  • "source": "string",
  • "mimeType": "image/jpeg",
  • "metadata": {
    • "property1": "string",
    • "property2": "string"
    },
  • "assetIds": [
    • 1
    ],
  • "dataSetId": 1,
  • "sourceCreatedTime": 1730204346000,
  • "sourceModifiedTime": 1730204346000,
  • "securityCategories": [
    • 1
    ],
  • "labels": [
    • {
      }
    ],
  • "geoLocation": {
    • "type": "Feature",
    • "geometry": {
      },
    • "properties": { }
    },
  • "id": 1,
  • "uploaded": true,
  • "uploadedTime": 1730204346000,
  • "createdTime": 1730204346000,
  • "lastUpdatedTime": 1730204346000,
  • "instanceId": {
    • "space": "string",
    • "externalId": "string"
    }
}