LogoLogo
BlogHelp CenterPrivacyLoginRegister
  • Let's optimize your images
  • Transformations
    • Input formats
    • Image operations
      • Width and height
      • Prevent enlargement
      • Crop
        • Automatic gravity crop
        • Positionable crop
        • Focal point crop
        • Face crop
        • Face hide
        • Aspect ratio crop
      • Fit
      • Cropfit
      • Bound
      • Boundmin
      • Cover
      • Device pixel ratio
      • Flip
      • Rotate
      • Trim
      • Rounded corners
      • Background removal
    • Image filters
      • Adjustment
        • Brightness
        • Contrast
        • Saturate
      • Color manipulation
        • Color overlay
        • Grayscale
        • Duotone
        • Sepia
        • Invert
      • Blur
      • Pixelate
      • Sharpen
      • Face blur
    • Image watermarking
      • Static watermark
      • Dynamic watermark
      • Text watermark
        • Text watermark fonts
    • Image compression
      • Image formats
      • Optipress
      • SVG compression
      • Color management
    • Static content
      • PDF to image
      • JS/CSS optimization
    • Video operations
  • Setup
    • Shortening URLs
      • Origin URL prefix
      • Aliases
      • Presets
      • Rules
    • Connecting storage bucket
      • Amazon S3
      • Google Cloud Storage
      • Microsoft Azure Blob
      • Basic authentication HTTP
    • Security
      • Token security
        • Domain whitelisting
        • URL signature
        • URL sealing
      • Account security
      • Origin security
  • Implementation
    • URL API implementation
    • Responsive images JS plugin
    • CMS plugins
      • Spryker
      • Drupal
      • Kontent.ai
      • Contentful
      • Adobe Commerce (Magento)
        • Basic implementation
        • Advanced implementation
      • Opencart
      • Prestashop
        • Prestashop tutorial
      • Shopware
      • Sylius
      • Wordpress
      • Shopify tutorial
        • Shopify integration
        • Theme files
        • FAQ
      • Commercetools tutorial
      • Ruby wrapper
    • Migrating from another image CDN
  • Caching and acceleration
    • CDN basics
    • Caching interval
    • Invalidation API
    • Warmup API
  • Analytics
    • Dashboards
      • Overview
      • Volumetry
      • Optimization
      • Delivery
      • Top-Ranking
      • RUM
      • Logs API
  • Cloudimage_v6 EOL
Powered by GitBook
LogoLogo

Resources

  • Help center
  • Contact support
  • Developers
  • cloudimage.io

Solutions

  • Media optimization
  • DAM
  • Performance report

Company

  • Blog
  • Service status
  • About us

Legal stuff

  • Terms & conditions
  • Privacy center
  • DMCA

Copyright © 2023 Scaleflex

On this page
  • Step 1. Get your API key
  • Step 2. Call the Invalidation REST API
  • Invalidate multiple images with all their resizes
  • Invalidate all your images

Was this helpful?

Export as PDF
  1. Caching and acceleration

Invalidation API

Create invalidation requests via API

PreviousCaching intervalNextWarmup API

Last updated 17 days ago

Was this helpful?

The Invalidation API is a REST API that lets you remove cached images from the CDN and Cloudimage resizing servers.

Step 1. Get your API key

Your API key is available in the Cloudimage admin console, under Invalidation:

Step 2. Call the Invalidation REST API

POST https://api.cloudimage.com/invalidate
X-Client-Key: your_API_KEY
Content-Type: application/json

Body:

  • If you are using Invalidation with scope 'original', please do not append any Cloudimage query string parameters at the end of the invalidated URL. Example:

Invalidate multiple images with all their resizes

{
  "scope": "original",
  "urls": ["/sample.li/birds.jpg",
            "/sample.li/boat.jpg", ...
  ]
}

Invalidate all your images

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.

{
  "scope": "all"
}

Try it out with the doc token

For Cloudimage tokens created before November 2021, the invalidated URL should include "/v7/". Example: /v7/

For Cloudimage tokens created after November 2021, the invalidated URL should not include "/v7/". Example:

If you are using the its value should not be included. Example: images/image1.jpg

If you are using an, the alias should be invalidated (not the original value behind it). Example: _alias_/images/image1.jpg

correct URL format:

incorrect URL format:

if you have more than 1 TB of monthly CDN traffic or 1 TB of storage.

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

https://img.domain.com/image2.jpg
https://img.domain.com/image2.jpg
Origin prefix,
alias
https://img.domain.com/image2.jpg
https://img.domain.com/image2.jpg?w=600
Contact us
sample image
https://doc.cloudimg.io/sample.li/now.php?width=500