What undoing a session would do, written nowhere
const url = 'https://beta-api.plune.ai/v1/audit/sessions/example/restore-preview';const options = {method: 'GET', 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 GET \ --url https://beta-api.plune.ai/v1/audit/sessions/example/restore-preview \ --header 'Authorization: Bearer <token>'The preview of POST /v1/audit/sessions/{hash}/restore (#1282), a read: every member of the project may ask, a reader included. How many entries can be put back now (revertable of total), how many an earlier rollback already put back (alreadyReverted), the ones a person saved over after the session (changedByPeople) and the ones that cannot be put back (cannotRevert, with a reason code). The last two groups are what the rollback leaves as they are. An unknown hash is a preview of nothing: zeros and empty lists. Whether a folder that holds only what the session made can go is an estimate; the rollback itself is the judge.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”What a rollback would do
object
Entries a rollback would put back now.
Every entry of the session.
Left as they are: the same thing was saved by somebody else after the session.
object
The record’s title or name.
Who saved it last: the person’s name or address, or the token id; «deleted account» when byDeleted.
Present when the person’s account is in the Bin or was purged (#952).
The field both touched; null when the session created the record and it was worked on since.
The value now.
The value the session left.
Left as they are: the entry cannot be put back.
object
Example
{ "changedByPeople": [ { "byType": "user", "byDeleted": true } ], "cannotRevert": [ { "reason": "not_found" } ]}No / invalid token or session