Get icon

The GET /files/icon operation can be used to get an image representation of a file.

Either id or externalId must be provided as a query parameter (but not both). Supported file formats:

  • Normal jpeg and png files are currently fully supported.
  • Other image file formats might work, but continued support for these are not guaranteed.
  • Currently only supporting thumbnails for image files. Attempts to get icon for unsupported files will result in status 400.

Request throttling

This endpoint is a subject of the new throttling schema (limited request rate and concurrency). Please check Files resource description for more information.

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

A server-generated ID for the object.

externalId
string (CogniteExternalId) <= 255 characters

The external ID provided by the client. Must be unique for the resource type.

Example: externalId=my.known.id
space
string (InstanceSpace) [ 1 .. 43 ] characters ^[a-zA-Z][a-zA-Z0-9_-]{0,41}[a-zA-Z0-9]?$
instanceExternalId
string (InstanceExternalId) [ 1 .. 255 ] characters ^[a-zA-Z]([a-zA-Z0-9_]{0,253}[a-zA-Z0-9])?$
Responses
200

Thumbnail image (JPEG)

400

The response for a failed request.

get/files/icon
Request samples
Response samples
application/json
{
  • "error": {
    • "code": 401,
    • "message": "Could not authenticate.",
    • "missing": [
      ],
    • "duplicated": [
      ]
    }
}