Use this endpoint to purge the CDN cache for specific paths on your application. After a purge, the next request to each invalidated path will bypass the cache and fetch fresh content from your origin. This is useful after updating static assets, deploying content changes, or when you need to ensure users receive the latest version of a resource immediately.
Endpoint
POST https://api.virtuscloud.app/v2/apps/{app_id}/network/purge_cache
Authorization
Include your API key in the request header:
Path Parameters
The unique identifier of your application. You can find this in the URL of your application’s dashboard.
Body Parameters
An array of fully qualified URLs whose cached responses you want to invalidate. Each URL must include the scheme and hostname. For example:[
"https://yoursubdomain.virtusapp.cloud/",
"https://yoursubdomain.virtusapp.cloud/style.css",
"https://yoursubdomain.virtusapp.cloud/app.js"
]
Response
Indicates the outcome of the request. Returns "success" when the cache purge has been queued successfully.
Examples
curl --request POST \
--url "https://api.virtuscloud.app/v2/apps/{app_id}/network/purge_cache" \
--header "Authorization: <api_key>" \
--header "Content-Type: application/json" \
--data '{
"paths": [
"https://yoursubdomain.virtusapp.cloud/",
"https://yoursubdomain.virtusapp.cloud/style.css"
]
}'
Response Example
This endpoint enforces a rate limit of one request every 60 seconds. If you need to purge many paths, include all of them in a single request’s paths array rather than making multiple calls.
Cache purge operations are applied at the CDN edge and typically take effect within a few seconds. However, propagation across all edge nodes may take up to a minute in some regions.