Retrieve Binary Assets
| /dam/assets/bin/retrieve Retrieves binary data of asset(s). |
Resource path |
/api/core/v1/dam/assets/bin/retrieve |
HTTP method |
POST |
Request content type |
application/json |
Response content type |
application/octet-stream |
Body parameters
Specified by AssetRequest
-
tids - (List of String) - Filter parameter, asset TIDs (Metatag GUID), identifying unique objects
-
ids - (List of Integer) - Filter parameter, asset IDs, identifying unique objects
-
formats - (List of String) - Filter parameter, asset formats, identifying preview format or asset.
Return Type
Binary data. In case when multiple assets and / or multiple formats are requested, then files will be compressed into the zip. The zip file should be of the following structure: One directory per tid/id. In this directory the file name of the asset + the format prefix (+ file-suffix) should be used as file name.
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
OmnType with list of keywords |
|
400 |
Invalid input provided |
|
404 |
The requested resource could not be found |
|
500 |
An unknown internal error occurred |
Samples
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/assets/bin/retrieve' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <TOKEN> ' \
--data-raw <REQUEST_BODY>
Initial data: 2 files
1st file:
-
name: apollon_logo.jpg
-
identity: 1331131
-
tid: 05954601-9289-49A7-8652-BE74A7DB0E06
2nd file:
-
name: apollon_bg.png
-
identity: 22738178
-
tid: 7CD062AE-B69E-47D5-8422-8840E4A22E88
1. Retrieve asset by id
{
"ids": [1331131]
}
apollon_logo_original.png
2. Retrieve single asset by tid
{
"tids": ["7CD062AE-B69E-47D5-8422-8840E4A22E88"]
}
apollon_bg_original.png
3. Retrieve multiple assets by tids/ids:
{
"ids": [1331131, 22738178]
}
or
{
"tids": ["7CD062AE-B69E-47D5-8422-8840E4A22E88", "05954601-9289-49A7-8652-BE74A7DB0E06"]
}
result.zip
|----- 7CD062AE-B69E-47D5-8422-8840E4A22E88
| |---- apollon_logo_original.jpg
|
|----- 05954601-9289-49A7-8652-BE74A7DB0E06
|---- apollon_bg_original.png
4. Retrieve single asset’s single preview
{
"ids": [1331131],
"formats": ["previewThumbnail"]
}
apollon_logo_previewThumbnail.png
5. Retrieve single asset’s multiple previews:
{
"ids": [1331131],
"formats": ["previewThumbnail", "previewOriginal"]
}
result.zip
|----- 7CD062AE-B69E-47D5-8422-8840E4A22E88
|---- apollon_logo_previewThumbnail.jpg
|---- apollon_logo_previewOriginal.jpg
6. Retrieve multiple asset’s multiple previews:
{
"tids": ["7CD062AE-B69E-47D5-8422-8840E4A22E88", "05954601-9289-49A7-8652-BE74A7DB0E06"],
"formats": ["previewThumbnail", "previewOriginal"]
}
result.zip
|----- 7CD062AE-B69E-47D5-8422-8840E4A22E88
| |---- apollon_logo_previewThumbnail.jpg
| |---- apollon_logo_previewOriginal.jpg
|
|----- 05954601-9289-49A7-8652-BE74A7DB0E06
|---- apollon_bg_previewThumbnail.jpg
|---- apollon_bg_previewOriginal.jpg