Downloading asset renditions
Downloading original and preview
To download the original and preview contents of the asset. You can use the CSS URLs provided in the response while retrieving the asset. The following is an example of what the CSS URLs look like in the response:
API
GET: /v1/assets/{asset_id}
The API call returns a response similar to the following:
Response
{
"category": "file",
"id": "2f65cdce-16fe-495c-8135-a4a38df4d103",
"name": "Cream Tube White with Floor and Wall-0.jpg.jpeg",
"parent_folder_id": "016825e3-6633-4fa7-b037-edf21a372f63",
"create_time": "2024-10-23T05:04:36.063+00:00",
"update_time": "2024-10-23T05:06:01.571+00:00",
"deleted": false,
"hidden": false,
"version_no": 1,
"mime_type": "image/jpeg",
"content_type": "IMAGE",
"latest": true,
"spotlighted": false,
"spotlighted_to_home": false,
"content_size": 142054,
"renditions": [
{
"width": 768,
"height": 600,
"blob_id": "71e31891-757c-4e10-a650-f014388bf67e",
"mime_type": "image/jpeg",
"content_size": 82349,
"name": "preview",
"rendition_type": "SECONDARY",
"source": "FILE_ID",
"_links": {
"content_url": {
"href": "http://css.css.svc.cluster.local/v3/files/71e31891-757c-4e10-a650-f014388bf67e/stream"
}
}
},
{
"width": 0,
"height": 0,
"blob_id": "e8b609b2-3c3f-4cb2-bc7f-4dd17cd8df73",
"mime_type": "image/jpeg",
"content_size": 142054,
"name": "Cream Tube White with Floor and Wall-0.jpg.jpeg",
"rendition_type": "PRIMARY",
"source": "FILE_ID",
"_links": {
"content_url": {
"href": "http://css.css.svc.cluster.local/v3/files/e8b609b2-3c3f-4cb2-bc7f-4dd17cd8df73/stream"
}
}
}
],
............................................
}
You can find the content_urls for original and preview content in the above response under renditions. Use those URLs to download the original and preview content.
Use the access token that is generated for the OpenText Core Content Management extension application to download content through the CSS URLs.