Download request
This relation targets a download request.
Create a download request
A download request can be created by sending POST request on the download.
For example to create a download request for 3 images with export format with id 1 (from field can be get with available-export-formats resource):
POST /api/dam/download-requests
{
"elementDownloads": [
{
"mediaIds": [
12871,
12875,
12876
],
"downloadSources": [
{
"from": {
"href": "https://baobab.keepeek.com/api/dam/users/2/selections/8yptk044/media-types/PICTURE/export-formats/1"
}
}
]
}
]
}
Api returns the url of the created download request in the `location` response header, ex.:
http://baobab.keepeek.com/api/dam/download-requests/yo9wc765
With that response you can do a get request to know the status of download request :
GET http://baobab.keepeek.com/api/dam/download-requests/yo9wc765
It returns the status and if it's finished the target file uri :
{
"id": "2ompqjck",
"expiredDate": "2021-03-11T12:16:47.000Z",
"elementDownloads": [
{
"mediaIds": [
12871,
12875,
12876
],
"downloadSources": [
{
"from": {
"href": "https://baobab.keepeek.com/api/dam/users/2/selections/8yptk044/media-types/PICTURE/export-formats/1"
}
}
]
}
],
"status": "SUCCESS",
"target": {
"kpk:target": "http://static.baobab.keepeek.com/cache/domain1/2/Keepeek-Export-jom4nuoi-11-03-2021-11-16-00.zip"
}
}
You can delete a download request :
DELETE http://baobab.keepeek.com/api/dam/download-requests/yo9wc765
4.54.0+
Download sources
Contact-sheet
The download-request
feature also manages contact-sheet
export.
POST /api/dam/download-requests
{
"elementDownloads": [
{
"mediaIds": [
12871,
12875,
12876
],
"downloadSources": [
{
"from": {
"href": "http://baobab.dev.local/api/dam/contact-sheets/-1"
},
"additionalExportParameters": {
"orientation": "PORTRAIT"
// or LANDSCAPE (optional)
}
}
]
}
]
}
4.68.0+