One of 38 things your AI can do in your Instroc account, in Versions and code
Restore app version
restore_
Makes changes Replaces the app's files
Ask your AI
- The last change broke it, go back
- Undo the last build
- Restore version 12
What it does
Restores an Instroc app's files to an earlier saved version, by the version_id list_app_versions returns.
Fits requests like 'the last change broke it, go back', 'undo the last build', 'restore version 12'. Before anything changes, the app's current files are saved as a new version; if that save fails, nothing is restored. Restoring the version in saved_current_as undoes the restore. Once that version is saved, the answers Instroc writes name it, including a refusal because a build or an editor save started meanwhile, a restore that stopped with an error, and a partial restore with the files that were not written; when a call is cut off before any answer, list_app_versions shows it, described 'Before restoring to version N'. After an earlier restore of the app that did not finish, saved_current_as is the version from before that one, and saved_unfinished_as holds the files as they were at the call. One restore per app runs at a time. Refused while a build is queued or running on the app. When the files already match the version, nothing changes and nothing is saved. Only the app's files change: the live site keeps serving what was last published until the app is published again, and the app's database is not rolled back. Returns changed, restored_to, saved_current_as, live_changed (false) and database_changed (false). Needs the editor role in the app's workspace.
This is the text your AI reads, word for word.
- Changes
- Yes. The app's files go back to an earlier version, and the current ones are saved first. The live site does not change until the app is published again.
- Role needed
- Editor in the app's workspace
Inputs
project_idRequired- The app's project_id, as returned by list_my_apps.
version_idRequired- The version's version_id, as returned by list_app_versions.