Warmup API
Warm-up allows you to proactively cache your images in the Cloudimage infrastructure for faster processing upon first request from your end users. We recommend to warm-up Cloudimage if you deliver a large amount of new images (few tens of thousands) or if you have images with less than 10 views in order to experience the best performance globally.
Creating a warmup task
You can provide a list of your images either in the request body or in a txt/csv file .
JSON URL list
Endpoint
Request header
X-Client-Key: client_592553ed1c0250489b8d52b53
Content-Type: application/json
X-Client-Key
is the client's API key (can be found in Admin Console: Image Settings / Invalidation).
Request body
In the body, you need to provide the list of the URLs of your images. You can also provide your token as well as a description of the warmup task (optional):
{
"warmup": {
"desc": "Some test // optional",
"token": "<cloudimage_token> // optional",
"uris": [
"http://xxxx.cloudimg.io/xxxxxxx",
"http://xxxx.cloudimg.io/xxxxxx1",
"http://xxxx.cloudimg.io/xxxxxx2",
"http://xxxx.cloudimg.io/xxxxxx3"
]
}
}
Response
The id
property of the warmup task is returned in the response. It can be used to check the task status.
{
"status": "success",
"warmup": {
"id": "wrmHkC9URDj8Z",
"added_uris": 1
}
}
URL list file
Endpoint
Sample request with a file
curl --location --request POST 'https://api.cloudimage.com/warmup' \
--header 'X-Client-Key: client_592553ed1c0250489b8d52b53' \
--header 'Content-Type: text/csv' \
--data-binary '@/Path/To/File/url_list.csv'
X-Client-Key
is the client's API key (can be found in Admin Console: Image Settings / Invalidation).
URL list file format
You need to provide a file with all your images for the warmup (one URL per line):
http://xxxx.cloudimg.io/xxxxxxx
http://xxxx.cloudimg.io/xxxxxx1
http://xxxx.cloudimg.io/xxxxxx2
http://xxxx.cloudimg.io/xxxxxx3
http://xxxx.cloudimg.io/xxxxxx4
http://xxxx.cloudimg.io/xxxxxx5
Response
{
"status": "success",
"warmup": {
"id": "wrmHkC9URDj8Z",
"added_uris": 1
}
}
The id
property of the warmup task is returned in the response. It can be used to check the task status.