Headers:
X-Client-Key: your_API_KEY
Content-Type: application/json
Body:
The body of the request must contain the invalidation url in the form /_alias_/path/image1.jpg or /origin_image_url/image2.jpg.
Sample URL: https://doc.cloudimg.io/sample.li/boat.jpg?width=300
To invalidate all the resizes of this image, use: /sample.li/boat.jpg or v7/sample.li/boat.jpg.
Invalidate multiple images with all their resizes
{
"scope": "original",
"urls": ["/sample.li/birds.jpg",
"/sample.li/boat.jpg", ...
]
}
Invalidate URLs with wildcards
{
"scope": "original",
"urls": ["/sample.li/avatars/*",
"/sample.li/profile_pics/*", ...
]
}
The example above will invalidate all images (and their resizes) starting with either /sample.li/avatars/
or /sample.li/profile_pics/
.
Please note that original flushes require the entire log database to be searched and it can take up to 60 seconds.
Flushing all images will result in Cloudimage downloading all your images from your origin image storage again. This will result in slower image loading times for the first times the images are downloaded. Contact us if you have more than 1 TB of monthly CDN traffic or 1 TB of storage.
Try it out with the doc token doc
You can use our sample image showing the time it is resized the first time:
https://doc.cloudimg.io/sample.li/now.php?width=500
Click on 'Send' to call the Invalidation API and reload the image above (invalidation takes about 30 seconds to complete). You should see the new time. You might need to disable your browser's local cache to see the new image immediately.