Skip to content

Purge cache via URL or cache keys

POST
/api/v2/organizations/{organization}/projects/{project}/purge
curl --request POST \
--url https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/purge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "cache_keys": [ "example" ], "urls": [ "example" ], "scope": "project", "soft": true }'
organization
required
string

Organization identifier

Example
test-org
project
required
string

Project identifier

Example
test-project
Media typeapplication/json

Send cache_keys, urls, or both. At least one of them must be non-empty.

object
cache_keys

Cache keys to purge. Optional when urls is set.

Array<string>
urls

URL paths to purge, each starting with a slash (for example /contact). Use /* to purge the whole project. At most 100 per request; a single string is also accepted. The whole list is validated before any purge is sent. Optional when cache_keys is set.

Array<string>
<= 100 items
scope

Purge scope for cache_keys (project or org). Not used for urls.

string
default: project
Allowed values: project org
soft

Soft purge: mark cached content stale instead of removing it. When omitted, the purge is soft (true). Send false for a hard purge.

boolean
default: true

The purge was accepted.

Media typeapplication/json
object
status
string
Example
{
"status": "okay"
}

Invalid request: no urls or cache_keys, an invalid scope, more than 100 URLs, or a URL that is not a string path starting with a slash. Nothing is purged.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}

Access is forbidden.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}

The content API did not accept the purge for one or more URLs. The message names those paths; the other URLs were purged.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}