{
  "openapi": "3.0.1",
  "info": {
    "title": "Cache API",
    "description": "Use the Cache API to clear your caches. A cache temporarily stores active data, such as web pages, text, and images, in a \ndedicated local folder to accelerate access times and enhance overall performance. Content Hub uses various [caches](https://doc.sitecore.com/ch/en/developers/cloud-dev/cache.html).\n\n{% admonition type=\"info\" name=\"Note\" %}When you clear a cache, Content Hub rebuilds it using data from the database, which might result in a slight dip in performance for anyone using Content Hub at that time.{% /admonition %}  \n## Authentication\n\nTo use this API, you need:\n\n- The URL of your Content Hub server. You can get this from your Content Hub\n  Administrator. Enter this URL in the <b>{{server}}</b> variable by hovering your mouse \n  over the variable in the <b>Try it</b> pane and then clicking <b>Edit</b>.\n\n- An access token and the client ID. Both are sent with every request. You \n  can create a token through the [Content Hub\n  interface](https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html) \n  or by [requesting one using the API\n  itself](https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows)\n",
    "version": "v1.0",
    "x-metadata": {
      "product": "Content Hub"
    },
    "license": {
      "name": "closed source",
      "url": "https://www.sitecore.com"
    }
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "your-server"
        }
      }
    }
  ],
  "security": [
    {
      "OAuth2.0": []
    }
  ],
  "tags": [
    {
      "name": "Cache",
      "description": "Use the Cache API to clear the caches used by Content Hub."
    }
  ],
  "paths": {
    "/api/cache/{name}": {
      "delete": {
        "tags": [
          "Cache"
        ],
        "summary": "Clear the cache",
        "description": "Clears a specific cache using the cache name or clears all caches when the `name` is defined as `all`. {% admonition type=\"info\" name=\"Note\" %}We strongly recommend that you do not clear your caches during periods of high system load. This can temporarily degrade performance and increase response times for some users.{% /admonition %}",
        "operationId": "Cache",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "The name of the cache to clear. Use `all` to clear all caches.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cache was successfully cleared"
          },
          "400": {
            "description": "The cache name was not provided or is invalid"
          },
          "401": {
            "description": "Unauthorized request. The user does not have permission to clear caches"
          },
          "404": {
            "description": "The specified cache name does not exist"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2.0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {}
          },
          "authorizationCode": {
            "authorizationUrl": "/oauth/authorize",
            "tokenUrl": "/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  }
}