Assets

Get resources by external IDs

GET
/v1_1/{cloud_name}/resources/by_external_ids

Retrieves details for specific resources using their external IDs (or asset IDs).

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

Query Parameters

external_ids*array<string>

List of external IDs for identifying the assets to retrieve. Either external_ids or asset_ids must be provided.

resource_type?string

Resource type filter.

Value in

  • "image"
  • "video"
  • "raw"
fields?|array<>

Additional fields to include in the response. The fields public_id and asset_id are always included.

tags?boolean

Whether to include the list of tag names assigned to each asset. Default is false.

Defaultfalse
context?boolean

Whether to include key-value pairs of contextual metadata associated with each asset. Default is false.

Defaultfalse
metadata?boolean

Whether to include the structured metadata fields and values assigned to each asset. Default is false.

Defaultfalse
moderations?boolean

Whether to include image moderation status of each asset. Default is false.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1_1/my_cloud/resources/by_external_ids?external_ids=string"
{  "resources": [    {      "asset_id": "03a5b92135161439031d3834c04bc31b",      "public_id": "sample",      "format": "jpg",      "version": 1719304854,      "resource_type": "image",      "type": "upload",      "created_at": "2021-06-25T08:40:54+00:00",      "bytes": 120253,      "width": 864,      "height": 576,      "asset_folder": "",      "display_name": "sample",      "url": "http://res.cloudinary.com/demo/image/upload/v1719304854/sample.jpg",      "secure_url": "https://res.cloudinary.com/demo/image/upload/v1719304854/sample.jpg"    }  ],  "next_cursor": "e4c19d14efae368a0b1b856e2b7c9d625bd9be6c",  "total_count": 1}