Skip to content

Delete forever the Bin entries named

POST
/v1/bin/purge
curl --request POST \
--url https://beta-api.plune.ai/v1/bin/purge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "kind": "suite", "id": "6f1c2b3a-0000-4000-8000-0000000000a1" }, { "kind": "case", "id": "6f1c2b3a-0000-4000-8000-0000000000c1" }, { "kind": "run", "id": "6f1c2b3a-0000-4000-8000-0000000000d1" } ], "dryRun": true }'

The way out of the Bin for good (#1020), for what a person selected on the list: a suite entry (the node, its subtree and the cases that went with it), a case deleted on its own, a run (with its results, its queue entries and its files). Irreversible — nothing brings these rows back, and the sweep that would have taken them after six months only comes later. For the same people who may restore: an owner of the project, in it, and the owner of the deployment in a project they are a member of. A reader is refused at the boundary like every write (403); everybody else, and anything that is not an entry of the caller’s own Bin — a row that is live, another project’s, an id nobody has — is answered 404, the same 404 whichever it is, and nothing is deleted: all or nothing. The history stays, and a screen says so before the person confirms: it keeps the earlier versions of what was written in cases and suites, and changes made to a run after it was created, such as an edit, a corrected mark, a delete or a restore. The creation of a run, of its results and of their files was never in it, whether a reporter sent them or a person opened and marked a manual run. Every root item taken leaves one new delete entry with its id and the actor and none of the content. dryRun: true does the same work and rolls it back, answering the counts the real call would have; those are an estimate if the data changes between the two calls.

Media type application/json

The Bin entries to delete forever (#1020): one to 200 of the three kinds GET /v1/bin lists. All or nothing — when any of them is not in the caller’s project’s Bin, nothing is deleted and the whole call is answered 404.

object
items
required
Array<object>
>= 1 items <= 200 items
object
kind
required

suite names an ENTRY of the list — the node that was deleted, with its subtree and the cases that went with it; a node inside an entry is not one. case is a case deleted on its own, run a deleted run.

string
Allowed values: suite case run
id
required
string format: uuid
dryRun

Do all of it and roll it back: the answer carries the counts the real call would have, and nothing is deleted.

boolean
Example
{
"items": [
{
"kind": "suite",
"id": "6f1c2b3a-0000-4000-8000-0000000000a1"
},
{
"kind": "case",
"id": "6f1c2b3a-0000-4000-8000-0000000000c1"
},
{
"kind": "run",
"id": "6f1c2b3a-0000-4000-8000-0000000000d1"
}
],
"dryRun": true
}

What was deleted — or, on a dry run, what would be

Media type application/json
object
dryRun
required

Echoes the request. false means these rows are gone.

boolean
purged
required

What a delete forever removed — or, on a dryRun, would have: the rows of three tables and what hung off them. results and reviewItems count every one that went, including the results of a deleted case inside a run that is still live: a result is a row of its case before it is a row of its run. A finished run keeps the summary it froze when it ended.

object
suites
required

Suite nodes deleted: the whole subtree of each entry that went, or, when part of an entry had to stay (skipped), the part of it that could go.

integer
testCases
required

Cases deleted — those named, and those that went with a suite.

integer
runs
required
integer
results
required
integer
reviewItems
required

Queue entries on those results, and the discoveries of those runs.

integer
skipped
required

The suite entries that had to stay, each named by the id of its root, and why — what the call could not delete, not what it refused. holds_case: a case that is not part of the entry still sits in the suite — for instance one deleted on its own at another time (an entry of its own). holds_suite: a suite that stays is still inside it — for instance a child that was restored on its own — and a parent never goes before its child. Only suites can be held — nothing points at a case or a run. Whatever of the entry could go has gone.

Array<object>
object
kind
required
string
Allowed values: suite
id
required
string format: uuid
reason
required
string
Allowed values: holds_case holds_suite
Example
{
"dryRun": true,
"purged": {
"suites": 3,
"testCases": 12,
"runs": 1,
"results": 48,
"reviewItems": 2
},
"skipped": []
}

Invalid body — no item, more than 200, an unknown kind, an id that is not text, a dryRun that is not a boolean

Media type application/json
object
error
required
string
Examples
Example noItems
{
"error": "validation failed — items: Too small: expected array to have >=1 items"
}

No / invalid token or session

The caller may not delete forever in this project, or an item is not an entry of its Bin — one answer for both, and for every item, so nothing says which; nothing was deleted

Media type application/json
object
error
required
string
Example
{
"error": "not found"
}

Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over