Skip to content

Restore an app to an earlier version

POST
/api/v1/artifacts/app/{name}/history/{commit}/restore
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.

name
required
string

The app’s file name in the workspace, e.g. dashboard.html

commit
required
string

The commit to restore, as its history lists it: 7 to 40 lower-case hex digits

Restored

Media type*/*

Confirmation that an app was put back as it was at an earlier version

object
commit

The new commit recording the restore. Null when the files were restored but git could not record it

string
from
required

The commit whose files were restored

string
name
required

The app’s name

string
status
required

Always restored

string

Not an app name

Media type*/*

A refusal carrying only its reason

object
error
required

Why the request was refused, written to be shown

string

No such version, or the app did not exist at it

Media type*/*

A refusal carrying only its reason

object
error
required

Why the request was refused, written to be shown

string

This world keeps no history

Media type*/*

A refusal carrying only its reason

object
error
required

Why the request was refused, written to be shown

string