PATCH /zones/{zone_id}/cache/variants
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
Name | Type | Required | Description |
---|---|---|---|
zone_id |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
value |
Object | Yes |
Value of the zone setting. |
value.jp2[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for jp2. |
value.webp[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for webp. |
value.jpg[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for jpg. |
value.jpg2[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for jpg2. |
value.tif[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for tif. |
value.gif[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for gif. |
value.avif[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for avif. |
value.bmp[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for bmp. |
value.jpeg[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for jpeg. |
value.tiff[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for tiff. |
value.png[] |
Array | No |
List of strings with the MIME types of all the variants that should be served for png. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.