Purge keys from a cache
POST
/api/v3/organizations/{organisation}/resources/{resource}/purge
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/resources/vk-sessions/purge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"scope":"environment","application":"test-app","environment":"production","confirm":true,"cursor":"example"}'};
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://dashboard.quantcdn.io/api/v3/organizations/test-org/resources/vk-sessions/purge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "scope": "environment", "application": "test-app", "environment": "production", "confirm": true, "cursor": "example" }'Cache resources only. scope environment deletes that environment’s keys, using the CACHE_PREFIX recorded on its attachment rather than anything in the request. scope all flushes every key for every attached environment and requires confirm=true. A large environment purge may return complete=false with a cursor to resume.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
The organisation ID
Example
test-orgresource
required
string
The resource ID
Example
vk-sessionsRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
scope
required
string
application
Scope environment only
string
Example
test-appenvironment
Scope environment only
string
Example
productionconfirm
Scope all only; must be true
boolean
cursor
Scope environment only; resume a partial purge
string
Responses
Section titled “Responses”Purge result
Media typeapplication/json
object
scope
string
prefix
string
deletedKeys
integer
complete
boolean
cursor
string
flushed
boolean
Examplegenerated
{ "scope": "example", "prefix": "example", "deletedKeys": 1, "complete": true, "cursor": "example", "flushed": true}No such attachment
Invalid scope, missing application/environment, or scope all without confirm
