API Changes and Undo
Every write made through the admin API — by an agent or by the klahaya command line — is recorded as a batch: who did it, when, which records it touched and what each looked like before and after. The Changes made through the API list on Admin > Settings > API Access is where you review those changes and undo them.
You can also jump straight there with the command palette: search for API Changes.
Reading the list
Section titled “Reading the list”Each row is one batch, newest first:
- What was done, in plain language — Created lesson classes, Edited volunteer shifts, Logged volunteer hours, Undid an earlier change, and so on.
- A status: Applied, Partly applied (some rows failed), Failed or Running.
- Undone or Partly undone once a revert has been applied to it.
- Who performed it, when, and how many records succeeded out of the total.
Click Show older changes to page further back.
Seeing what changed
Section titled “Seeing what changed”Click Details on a batch. The dialog lists every record it wrote, with the action taken and the record’s name. For edits, only the fields that changed are shown as before → after, so the one field that matters is not buried in a full dump. Rows that failed show the error; rows that have since been undone are marked Undone, and rows a revert could not touch say Could not be undone with the reason.
Undoing a change
Section titled “Undoing a change”-
Click Undo on the batch. The button appears only on batches that applied something and have not already been fully undone.
-
The portal works out what an undo would actually do and shows it before anything happens: which records will be Deleted (things the batch created) or Restored (things it edited, put back to their earlier values), and which are left as they are, each with the reason.
-
Click Undo it (or Undo them), or Cancel.
The undo is itself recorded as a new batch (Undid an earlier change) at the top of the list, so it is auditable like everything else.
From the command line
Section titled “From the command line”The same ledger is available in the klahaya tool: klahaya batches list, klahaya batches get <id> and klahaya batches revert <id>, which produces the same revert plan for you to apply. See The klahaya Command Line.