- Home
- API Enriched
- Cdn
- cdn
- Purge CDN Cache.
Purge CDN Cache.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/cdn/namespaces/example/cdn_loadbalancer/example/cache-purge';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"hard_purge":{},"hostname":"example","pattern":"example","purge_all":{},"soft_purge":{},"url":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/cdn/namespaces/example/cdn_loadbalancer/example/cache-purge \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "hard_purge": {}, "hostname": "example", "pattern": "example", "purge_all": {}, "soft_purge": {}, "url": "https://example.com" }'Initiate Purge for Edge CDN Cache.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace x-required Namespace scope of the metric request.
CDN Distribution Name x-required Format: string.
Request Bodyrequired
Section titled “Request Bodyrequired”CDN Cache Purge.
object
object
Exclusive with [pattern purge_all URL] Purge cached content by Hostname.
Exclusive with [hostname purge_all URL] Purge cached content using PCRE 1 compliant regular expression.
object
object
Exclusive with [hostname pattern purge_all] Purge cache by using a URL path.
Examplegenerated
{ "hard_purge": {}, "hostname": "example", "pattern": "example", "purge_all": {}, "soft_purge": {}, "url": "https://example.com"}Responses
Section titled “Responses”A successful response.
Cache Purge message.
object
Request ID to track the status of the purge request.
Examplegenerated
{ "purge_request_id": 1}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example