Purge an site HTTP and CloudFlare cache by prefix, host, cache tag or file path.#
It is important to note that Servebolt CDN users can only purge by Tags, or by Host. For full access to all types of purging, the website must be setup on the Accelerated Domains CDN.
Servebolt CDN and Accelerated Domains use different Zones inside Cloudflare, sending requests to the wrong zone will fail. Make sure to set the Type to be 'serveboltcdn' when on Servebolt CDN.
To confirm uniqueness of the cache tags, make sure to use a prefix when adding them to HTTP headers on reponses, and again when requesting a purge. In the example the Environment ID has been used as a prefix. On Servebolt hosted services, the enviroment.json file can be found in the ~/ home of the SSH/FTP user on the server. In this file there is both the API bearer key and the Site ID.
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
stringÂ
required
the Environement id can be found in the ~/environment.json file under the key id
Example:
1234
Header Params
Accept
stringÂ
required
Example:
application/json
Content-Type
stringÂ
required
Example:
application/json
Authorization
stringÂ
required
The API token can be found in the ~/environement.json file on servebolt hosting
Example:
Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379
Body Params application/json
files
array[string]
optional
prefixes
array[string]
optional
Hosts
array[string]
optional
tags
array[string]
optional
type
stringÂ
optional
Use "serveboltcdn" to define that you are on Servebolt CDN and not Accelerated Domains