Invalidation API

The Invalidation API is a REST API to invalidate images from the CDN and Filerobot resizing servers.

POST /invalidate

Request body

The body of the request must contain the invalidation url in the form /folder/filename?operations&filters.

Asset to invalidateInvalidation URL
fdocs.filerobot.com/fashion-products/purple_dress.jpg?width=300fashion-products/purple_dress.jpg?width=300

Invalidate specific sizes of images

{
   "invalidation": {
       "token": "YOUR_TOKEN",
       "scope": "urls",
       "urls": [
            "/docs/paris.jpg?width=400",
            "/docs/flat.jpg?width=400", ...
       ]
   }
}

Invalidate all sizes of images

{
   "invalidation": {
       "token": "YOUR_TOKEN",
       "scope": "original",
       "urls": [
            "docs/paris.jpg",
            "docs/flat.jpg", ...
       ]
   }
}

Wildcards

You can use wildcards to invalidate all images images matching a specific pattern.

{
   "invalidation": {
       "token": "YOUR_TOKEN",
       "scope": "original",
       "urls": [
            "*docs*",
            "*have-this-on-path*", ...
       ]
   }
}

Invalidate all assets

This will trigger a re-download of all images from your container.

{
   "invalidation": {
       "token": "YOUR_TOKEN",
       "scope": "all",
   }
}

Flushing all images will result in Filerobot reprocessing all your images. This will result in slower image loading times for the first times the images are processed. Contact us if you have more than 1 TB of monthly CDN traffic or 1 TB of storage.

Try it out with the demo token

You can use our sample image showing the time it is resized the first time:

https://fdocs.filerobot.com/http://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.

host: "http://api.filerobot.com/invalidate" theme: light headers: X-Filerobot-Key: bf72d18393ea40d5b4fccd9fb83806fa Content-Type: application/json editor_theme: light method: POST body: | { "invalidation": { "token" : "fdocs", "scope" : "url", "url": "/http://sample.li/now.php?width=500" } }