A record's history, and restoring just the records you lost
A restore put a whole environment, or a whole model, back to a time, so getting back 30 orders an action deleted by mistake also threw away every legitimate write to orders since. Now ib-apps restore and the API put back just the records you choose: by id, by what happened to them since (deleted, changed or created), or by a filter on their values then. ib-apps history <model> <id> lists one record's versions, a deleted record's too, with each field before and after, and --undo or --restore puts it back to any of them.
ib-apps restore --at 25m --model order --only deleted brings back the orders deleted in the last 25 minutes and leaves everything else as it is. The preview lists the first 20 records it would change, and the CLI prints the command that undoes just those records.
The API is POST …/restore with ids, filter and only beside model, and GET …/models/:model/records/:id/history. A version from a record's history can stand in for the time: the records go back as they were just before that change. Both take what a restore takes: owners and admins, Apps Permissions, or Deploy on the app. The Backups page is unchanged.
The new flags and ib-apps history need @inferencebureau/apps 0.17.0.
More in Restoring chosen records.