Get variants setting

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.

/zones/{zone_identifier}/cache/variants

get

Zone Cache Settings

zone-cache-settings-get-variants-setting

Debug "planAvailability"

{
  "business": true,
  "enterprise": true,
  "free": false,
  "pro": true
}

Debug "tokenPermissions"

{
  "enum": [
    "#zone_settings:read"
  ]
}

Debug "parameters"

[
  {
    "in": "path",
    "name": "zone_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  }
]

Debug "requestBody"

null

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "allOf": [
                    {
                      "properties": {
                        "errors": {
                          "example": [],
                          "items": {
                            "properties": {
                              "code": {
                                "minimum": 1000,
                                "type": "integer"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message"
                            ],
                            "type": "object",
                            "uniqueItems": true
                          },
                          "type": "array"
                        },
                        "messages": {
                          "example": [],
                          "items": {
                            "properties": {
                              "code": {
                                "minimum": 1000,
                                "type": "integer"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message"
                            ],
                            "type": "object",
                            "uniqueItems": true
                          },
                          "type": "array"
                        },
                        "result": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "items": {},
                              "type": "array"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "success": {
                          "description": "Whether the API call was successful",
                          "enum": [
                            true
                          ],
                          "example": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "success",
                        "errors",
                        "messages",
                        "result"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "result": {
                          "anyOf": [
                            {
                              "nullable": true,
                              "type": "object"
                            },
                            {
                              "nullable": true,
                              "type": "string"
                            }
                          ]
                        }
                      }
                    }
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "type": "object"
                    }
                  }
                }
              ]
            },
            {
              "properties": {
                "result": {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "properties": {
                            "id": {
                              "description": "Identifier of the zone setting.",
                              "type": "string"
                            },
                            "modified_on": {
                              "description": "last time this setting was modified.",
                              "example": "2014-01-01T05:20:00.12345Z",
                              "format": "date-time",
                              "nullable": true,
                              "readOnly": true,
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "modified_on"
                          ]
                        },
                        {
                          "properties": {
                            "id": {
                              "description": "ID of the zone setting.",
                              "enum": [
                                "variants"
                              ],
                              "example": "variants"
                            }
                          }
                        }
                      ],
                      "description": "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.",
                      "title": "Variants Caching"
                    },
                    {
                      "properties": {
                        "value": {
                          "description": "Value of the zone setting.",
                          "properties": {
                            "avif": {
                              "description": "List of strings with the MIME types of all the variants that should be served for avif.",
                              "example": [
                                "image/webp",
                                "image/jpeg"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "bmp": {
                              "description": "List of strings with the MIME types of all the variants that should be served for bmp.",
                              "example": [
                                "image/webp",
                                "image/jpeg"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "gif": {
                              "description": "List of strings with the MIME types of all the variants that should be served for gif.",
                              "example": [
                                "image/webp",
                                "image/jpeg"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "jp2": {
                              "description": "List of strings with the MIME types of all the variants that should be served for jp2.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "jpeg": {
                              "description": "List of strings with the MIME types of all the variants that should be served for jpeg.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "jpg": {
                              "description": "List of strings with the MIME types of all the variants that should be served for jpg.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "jpg2": {
                              "description": "List of strings with the MIME types of all the variants that should be served for jpg2.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "png": {
                              "description": "List of strings with the MIME types of all the variants that should be served for png.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "tif": {
                              "description": "List of strings with the MIME types of all the variants that should be served for tif.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "tiff": {
                              "description": "List of strings with the MIME types of all the variants that should be served for tiff.",
                              "example": [
                                "image/webp",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            },
                            "webp": {
                              "description": "List of strings with the MIME types of all the variants that should be served for webp.",
                              "example": [
                                "image/jpeg",
                                "image/avif"
                              ],
                              "items": {},
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "type": "object"
                        }
                      },
                      "required": [
                        "value"
                      ]
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "description": "Get variants setting response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "properties": {
                            "errors": {
                              "example": [],
                              "items": {
                                "properties": {
                                  "code": {
                                    "minimum": 1000,
                                    "type": "integer"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object",
                                "uniqueItems": true
                              },
                              "type": "array"
                            },
                            "messages": {
                              "example": [],
                              "items": {
                                "properties": {
                                  "code": {
                                    "minimum": 1000,
                                    "type": "integer"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object",
                                "uniqueItems": true
                              },
                              "type": "array"
                            },
                            "result": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "items": {},
                                  "type": "array"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "success": {
                              "description": "Whether the API call was successful",
                              "enum": [
                                true
                              ],
                              "example": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "success",
                            "errors",
                            "messages",
                            "result"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "result": {
                              "anyOf": [
                                {
                                  "nullable": true,
                                  "type": "object"
                                },
                                {
                                  "nullable": true,
                                  "type": "string"
                                }
                              ]
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "result": {
                          "type": "object"
                        }
                      }
                    }
                  ]
                },
                {
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "allOf": [
                            {
                              "properties": {
                                "id": {
                                  "description": "Identifier of the zone setting.",
                                  "type": "string"
                                },
                                "modified_on": {
                                  "description": "last time this setting was modified.",
                                  "example": "2014-01-01T05:20:00.12345Z",
                                  "format": "date-time",
                                  "nullable": true,
                                  "readOnly": true,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "modified_on"
                              ]
                            },
                            {
                              "properties": {
                                "id": {
                                  "description": "ID of the zone setting.",
                                  "enum": [
                                    "variants"
                                  ],
                                  "example": "variants"
                                }
                              }
                            }
                          ],
                          "description": "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.",
                          "title": "Variants Caching"
                        },
                        {
                          "properties": {
                            "value": {
                              "description": "Value of the zone setting.",
                              "properties": {
                                "avif": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for avif.",
                                  "example": [
                                    "image/webp",
                                    "image/jpeg"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "bmp": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for bmp.",
                                  "example": [
                                    "image/webp",
                                    "image/jpeg"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "gif": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for gif.",
                                  "example": [
                                    "image/webp",
                                    "image/jpeg"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "jp2": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for jp2.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "jpeg": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for jpeg.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "jpg": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for jpg.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "jpg2": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for jpg2.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "png": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for png.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "tif": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for tif.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "tiff": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for tiff.",
                                  "example": [
                                    "image/webp",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                },
                                "webp": {
                                  "description": "List of strings with the MIME types of all the variants that should be served for webp.",
                                  "example": [
                                    "image/jpeg",
                                    "image/avif"
                                  ],
                                  "items": {},
                                  "type": "array",
                                  "uniqueItems": true
                                }
                              },
                              "type": "object"
                            }
                          },
                          "required": [
                            "value"
                          ]
                        }
                      ]
                    }
                  }
                }
              ]
            },
            {
              "properties": {
                "errors": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": [
                    {
                      "code": 7003,
                      "message": "No route for the URI"
                    }
                  ],
                  "minLength": 1
                },
                "messages": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": []
                },
                "result": {
                  "enum": [
                    null
                  ],
                  "nullable": true,
                  "type": "object"
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    false
                  ],
                  "example": false,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            }
          ]
        }
      }
    },
    "description": "Get variants setting response failure"
  }
}

Debug "security"

[
  {
    "api_email": [],
    "api_key": []
  }
]