Skip to content

RESTful restore

Make the online restore more RESTful.

The idea is to have a POST/PUT call taht triggers the restore and returns a job id. Then a GET with that job id will tell us if the restore is complete or not. Once it's done, we'll have a filename/token to actually download the generated archive.

This way we can implement #93 and #94 (closed)

Example:

$ curl -X PUT server:5000/api/restore -d ...
{
    "job": 123456
}
$ curl -X GET server:5000/api/restore/job/123456
{
    "status": "running"
}
$ curl -X GET server:5000/api/restore/job/123456
{
    "status": "done",
    "archive": "archive_name.tar.gz",
    "token": "4NwCBDK2wdgs8VuazDeIQR9KfDPxdCkLb",
    "until": "2016-03-08T13:37:00Z",
}