Maintain control of your Microsoft Office 365 email data
Post Reply
sbhark
Service Provider
Posts: 25
Liked: 11 times
Joined: Dec 21, 2015 1:53 pm
Full Name: Shun Bhark
Contact:

Tasks Queue for Restore via REST API

Post by sbhark » Dec 20, 2017 8:09 pm

Hi there,

First off love the new JSON REST API and Swagger, its great!

Creating new integrations really is easy as a breeze. :D

Question / request. I was wondering if it is possible to receive a task id for restores that are requested via the REST API.

Currently when a request is made for a restore one has to wait until a response is generated back to see if either 1) the restore failed 2) the restore went through successfully.

When creating an integration in a high traffic production environment having this request sitting waiting for a response is not ideal.

It will be great if instead we receive a response back for a task id and we can check on the task to see if the restore was completed.

Thanks,

Mike Resseler
Veeam Software
Posts: 4668
Liked: 498 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Tasks Queue for Restore via REST API

Post by Mike Resseler » Dec 21, 2017 5:29 am

Hi Shun,

Not sure if I will respond correctly (I probably misunderstand the question...) but can you not get the ID through this: https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=15

sbhark
Service Provider
Posts: 25
Liked: 11 times
Joined: Dec 21, 2015 1:53 pm
Full Name: Shun Bhark
Contact:

Re: Tasks Queue for Restore via REST API

Post by sbhark » Dec 21, 2017 6:38 pm

Hey Mike!,

Yes, I can definitely can get a restore session through (GET) /RestoreSessions which itself is very handy.

But the API calls which my question / request was referring to are:

- (POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Items/{ID}/Action
- (POST) /RestoreSessions/{ID}/Organization/Mailboxes/{ID}/Folders/{ID}/Action

Perhaps it already does put it in a queue, I am not sure, but from playing with Swagger and writing my own calls I need to wait a response from the API for the restore to either to be completed or not.

vmniels
Veeam Software
Posts: 1969
Liked: 430 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Tasks Queue for Restore via REST API

Post by vmniels » Dec 21, 2017 10:34 pm

The moment u start a restore session (VEX in the background - POST to /v1/RestoreSessions/action) there is an ID for this available on which you can work. Store this ID in a variable and u can keep using it for further calls.

If u want u can have a look at my code available via https://github.com/nielsengelen/vbo365-rest where the restore scenario is written & possible.
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

vmniels
Veeam Software
Posts: 1969
Liked: 430 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Tasks Queue for Restore via REST API

Post by vmniels » Dec 21, 2017 11:20 pm

So I just reread your question and you are correct, if u post something to Items or Folders there is no ID back for the task however there is a response code and if it works it is 200, if it fails it will be a different code (500 or 4xx). You could use these as a workaround to see if it was succesfull or not. Do keep in mind we need to complete the restore as u say (even it fails) to get a result either way, this is because we wait for VEX in the background.

If I understand it correct your feature request is the following:
The moment the call is done and the restore attempt is ongoing, assign an ID to this so you can work with it later on (for an overview or something in a history tab and deeper information?)
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

sbhark
Service Provider
Posts: 25
Liked: 11 times
Joined: Dec 21, 2015 1:53 pm
Full Name: Shun Bhark
Contact:

Re: Tasks Queue for Restore via REST API

Post by sbhark » Jan 03, 2018 1:30 pm

Understood.

Yes, that will be my feature request. That will be a great addition! :)

Thanks

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest