Skip to content

Undo a whole session

POST
/v1/audit/sessions/{hash}/restore
curl --request POST \
--url https://beta-api.plune.ai/v1/audit/sessions/example/restore \
--header 'Authorization: Bearer <token>'

Walks the session backwards — the changes were applied forwards, so the state before the FIRST change is what the earliest entry holds. A record someone else has touched since is skipped and named rather than overwritten: the point of undo is to remove one actor’s work, not everyone who came after them. Always 200 with a report, never a stop at the first refusal. A create is undone by deleting the record through the ordinary delete, so its refusals hold: a case with results stays, and so does a node that still holds something. That is what takes a filed case’s derived folders and suite with it (B-7) — and leaves a suite someone has filled since, named in the report.

hash
required
string

How many were put back, and what was not

Media type application/json
object
restored
required
integer
skipped
required
Array<object>
object
entryId
required
string
reason
required
string
Example generated
{
"restored": 1,
"skipped": [
{
"entryId": "example",
"reason": "example"
}
]
}

No / invalid token or session

Rate limited