Restore an app to an earlier version
const url = 'http://localhost:11044/api/v1/artifacts/app/example/history/example/restore';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/artifacts/app/example/history/example/restore \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Puts the workspace app’s files back as they were at that commit and commits the result, so the restore is itself a version. The app as it stood is kept first. The save gates do not run: the content is a version this world already accepted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The app’s file name in the workspace, e.g. dashboard.html
The commit to restore, as its history lists it: 7 to 40 lower-case hex digits
Responses
Section titled “Responses”Restored
Confirmation that an app was put back as it was at an earlier version
object
The new commit recording the restore. Null when the files were restored but git could not record it
The commit whose files were restored
The app’s name
Always restored
Not an app name
A refusal carrying only its reason
object
Why the request was refused, written to be shown
No such version, or the app did not exist at it
A refusal carrying only its reason
object
Why the request was refused, written to be shown
This world keeps no history
A refusal carrying only its reason
object
Why the request was refused, written to be shown

