Skip to content

Delete items in bulk by prefix and/or age

DELETE
/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items
curl --request DELETE \
--url 'https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/kv/0000/items?prefix=oauth_state%3A&older_than=24h' \
--header 'Authorization: Bearer <token>'

Deletes every item matching the filters. With no filters the whole store is cleared. A small purge finishes in the request and returns 200; a large one returns 202 with the counts so far and continues in the background. Idempotent.

organization
required
string

Organization identifier

Example
test-org
project
required
string

Project identifier

Example
test-project
store_id
required
string
Example
0000
prefix
string

Only delete keys that start with this string.

Example
oauth_state:
older_than
string

Only delete keys last updated before this instant. ISO 8601, or a duration with unit s, m, h or d.

Example
24h

The purge finished.

Media typeapplication/json
object
status
string
deleted
integer
scanned
integer
Example
{
"status": "complete",
"deleted": 12,
"scanned": 40
}

The purge continues in the background.

Media typeapplication/json
object
status
string
deleted
integer
scanned
integer
Example
{
"status": "in_progress",
"deleted": 21825,
"scanned": 22000
}

The server could not understand the request due to invalid syntax.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

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

Insufficient permissions.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

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