Delete for good every run, case, suite and company whose 30 days have passed, and make deleted accounts nobody
const url = 'https://beta-api.plune.ai/v1/admin/purge';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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://beta-api.plune.ai/v1/admin/purge \ --header 'Authorization: Bearer <token>'The second half of the run delete: DELETE /v1/runs/{id} hides a run and keeps it, this removes what has aged out. Irreversible — nothing brings these rows back, which is why they wait 30 days first. Restricted to the owner of the deployment; everyone else gets 404. Called by a schedule, not by a person: 0 everywhere is the normal answer.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”What the sweep removed
object
Deleted cases whose 30 days have passed, removed with their results (D21).
Deleted suites whose 30 days have passed and nothing live points at.
Projects a company took into the bin whose 30 days have passed, emptied (ADR 0038) — what was in them is counted above; the project row stays, because its audit feed names it.
Deleted companies whose 30 days have passed, removed with their people and invitations (ADR 0038).
Accounts their people deleted whose 30 days have passed, made nobody (#952): the row stays as the anchor of what names it, its address becomes deleted-<id>@deleted.invalid and its name, language and theme go; its places, tokens, invitations and sign-in links go.
Files announced for a bucket (POST /v1/results/{id}/files/uploads) and never completed, older than an hour, removed in the same call — their object as well, when the project still has a bucket (#945). At most 200 a call and 20 of one project, oldest first; a project whose bucket does not answer is left for the next night after its first refusal. A row older than 7 days is removed without asking the bucket, all of them in one night and outside those limits (its object, if any, stays in the customer’s bucket). The number counts both kinds. Absent on a deployment without a bucket wired.
Present (true) instead of pendingFiles when that sweep failed after the purge had been committed; the purge itself stands.
The objects in customers’ buckets that belonged to files removed for good (the purge, “Delete forever” in the Bin), deleted in the same call (#948). Only the exact key Plune wrote is requested, never a listing; an object already gone counts as deleted. At most 1000 a call (500 of one project, the projects in turn), the rest on the next.
object
Objects deleted or already gone, taken off the queue.
Objects the bucket refused or did not answer for, or whose key was refused as not Plune’s folder; each waits with a growing pause (1 h up to a day).
Taken but not asked tonight, paused 12 hours with no attempt counted: the project’s Secret does not open (or the platform key is missing), or its bucket kept failing. A project with no bucket connected is not visited and not counted: its rows wait for the same bucket and folder.
Present (true) instead of storageDeletions when that step failed after the purge had been committed; the purge itself stands.
Example generated
{ "ranAt": "2026-04-15T12:00:00Z", "runs": 1, "reviewItems": 1, "results": 1, "testCases": 1, "suites": 1, "projects": 1, "companies": 1, "accounts": 1, "pendingFiles": 1, "pendingFilesFailed": true, "storageDeletions": { "deleted": 1, "failed": 1, "waiting": 1 }, "storageDeletionsFailed": true}No / invalid token or session
The caller does not own the application
object
Example generated
{ "error": "example"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over