Skip to main content
POST
/
files
/
byids
JavaScript SDK
const files = await client.files.retrieve([{id: 123}, {externalId: 'abc'}]);
{
  "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>"
      }
    }
  ]
}

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.

Body

application/json

List of IDs of files to retrieve. Must be up to a maximum of 1000 IDs, and all of them must be unique.

items
(Select by Id · object | Select by ExternalId · object | Select by InstanceId · object)[]
required
Required array length: 1 - 1000 elements
ignoreUnknownIds
boolean
default:false

Ignore IDs and external IDs that are not found

Response

The response for a successful files/byids, files/search or files/update operation

items
object[]
Last modified on April 23, 2026