Skip to content

Empty the Bin — for good, a piece at a time

POST
/v1/bin/empty
curl --request POST \
--url https://beta-api.plune.ai/v1/bin/empty \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "confirm": "default", "dryRun": true }'

Delete forever the entries of the caller’s project’s Bin a piece at a time: the cases deleted on their own first, then the runs, then the suites, the oldest first within each kind. A call takes up to limit root items (500, also the default) from the front of that order — so a Bin bigger than that loses its cases before its runs and its runs before its suites — in transactions of at most 200, and answers how many are left of each kind. A big Bin is emptied by calling again while remaining is not zero; a suite entry that had to stay (skipped) is still counted there, so a client stops when a call deleted nothing. confirm must be the name of the project, exactly — anything else is 400 and nothing is deleted. Who may, and what is and is not deleted, are as for POST /v1/bin/purge; so is dryRun, except that here it is one transaction over every entry the call would take — up to 500 root items — and holds the real locks until it rolls back, where the real call works in transactions of at most 200.

Media type application/json

Empty the project’s Bin (#1020) a piece at a time: cases deleted on their own first, then runs, then suites, the oldest first within each kind — so when limit is smaller than the Bin, the kinds that come first are the ones that go.

object
confirm
required

The name of the project, exactly — letter case and spaces included. Anything else is 400 and nothing is deleted.

string
limit

The most entries this call deletes — root items of the Bin, as GET /v1/bin lists them, not rows. The answer says how many are left; call again.

integer
default: 500 >= 1 <= 500
dryRun

As for POST /v1/bin/purge: the counts the real call would have, nothing deleted — but in one transaction over everything the call would take, which holds the real locks until it rolls back.

boolean
Example
{
"confirm": "default",
"dryRun": true
}

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

Media type application/json

What POST /v1/bin/purge answers, and how much of the Bin is left — the number a screen calls again for.

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
remaining
required

Entries of each kind still in the Bin after the call, counted as GET /v1/bin lists them. A suite that had to stay (skipped) is still counted, so a client that calls again stops when a call deleted nothing.

object
suites
required
integer
testCases
required
integer
runs
required
integer
Example
{
"dryRun": true,
"purged": {
"suites": 3,
"testCases": 12,
"runs": 1,
"results": 48,
"reviewItems": 2
},
"skipped": [],
"remaining": {
"suites": 0,
"testCases": 0,
"runs": 0
}
}

The confirmation is not the name of the project, or the body is invalid — a limit outside 1 to 500, a dryRun that is not a boolean

Media type application/json
object
error
required
string
Examples
{
"error": "confirm must be the exact name of the project"
}

No / invalid token or session

The caller may not delete forever in this project — the same answer as for an id nobody has; 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