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
  • Creating a warm-up task
  • URL list from a file
  • URL list in request body
  • Getting warm-up status

Was this helpful?

Export as PDF
  1. Caching and acceleration

Warmup API

Process and cache your images before the first request with the Warmup API by Cloudimage

The Warmup API allows you to proactively cache your images in the Cloudimage infrastructure for faster processing before receiving the first request from your end users. We recommend to warm-up Cloudimage in the following cases:

  • upon launching a new collection of thousands/millions of images - to make sure that at launch time, all images will be pre-processed and rocket fast for end users;

  • at upload - to make sure that the uploaded image is already pre-processed to be immediately accessible for end users;

  • when dealing with large images (large animated GIF files, gigapixels pictures, etc.) - as pre-processing is important to save time on first load;

  • performance is a top priority even if it’s on the first load.

Creating a warm-up task

You can provide a list of your images either in a txt/csv file or in the request's body.

POSThttps://warmup.api.cloudimage.com/warmup/urls

URL list from a file

List file format

You need to provide a text file with all your images for the warm-up (one URL per line):

/sample.li/logo-cloudimg-black.png?w=200
/sample.li/logo-cloudimg-white.png?w=200
/sample.li/logo-cloudimg-yellow.png?w=200
/sample.li/hotel.jpg?pixellate=5
/sample.li/house.jpg?pixellate=5
/sample.li/eye.jpg?w=500&h=280
...

Request

curl --location --request POST 'https://warmup.api.cloudimage.com/warmup/urls' \
--header 'X-Client-Key: client_XXXXXXXXXXXXXXX' \
--form 'file=@url_list.csv'

X-Client-Key is the client's API key (can be found in Admin Console left menu : Settings / CDN Invalidation).

Response

{
    "status": "success",
    "count_added": 4,
    "count_failed": 0,
    "msg": ""
}

URL list in request body

Request

curl --location --request POST 'https://warmup.api.cloudimage.com/warmup/urls' \
--header 'X-Client-Key: client_XXXXXXXXXXXXXXX' \
--header 'Content-type: application/json' \
--data-raw '{"data": ["/sample.li/logo-cloudimg-black.png?w=200", "/sample.li/logo-cloudimg-white.png?w=200", "/sample.li/logo-cloudimg-yellow.png?w=200"]}'

X-Client-Key is the client's API key (can be found in Admin Console left menu : Settings / CDN Invalidation).

Response

{
    "status": "success",
    "count_added": 4,
    "count_failed": 0,
    "msg": ""
}

Getting warm-up status

You can check the status of the warm-up tasks for the last 5 days.

GET https://warmup.api.cloudimage.com/warmup/stats

Request

curl --location --request GET 'https://warmup.api.cloudimage.com/warmup/stats' \
--header 'X-Client-Key: client_XXXXXXXXXXXXXXX'

Response

{
    "status": "success",
    "msg": "This is the status count of your requests for the last 5 days. The new requests appear as added and once the warmup is complete, they will increase the failed or the success counters",
    "stats": {
        "added": 9543,
        "success": 749,
        "failed": 12
     }
}
PreviousInvalidation APINextDashboards

Last updated 9 months ago

Was this helpful?