- Posts: 73
- Liked: 9 times
- Joined: May 25, 2010 3:27 pm
- Full Name: mike
When starting a backup job via the REST API I am returned a taskId - this task stays running for a moment and then reports success with a message of "Triggered backup job" or something along those lines. What I'm looking to do is actually monitor the status of the job I just kicked off - which I believe is done through the backupSessions resource.
So - long story short - am I able to take that taskId and somehow retrieve the sessionId which it kicked off?
Or am I best to simply comb through backupSessions and take the latest one associated with my job name?
I'd rather perform the first option as it seems like it would be a little more accurate - just not sure if its possible?
- Posts: 12
- Liked: never
- Joined: Sep 15, 2009 6:03 pm
- Full Name: Jason Morris
I have only been working with rest for a day and a half now, so I'm not sure it is the BEST solution, but I got it to work.
Basically, I did a POST to backupServers , running a VeeamZip task.
I got a TaskID from the response, which I used to do a GET on /api/tasks
I waited for the show a State of "Finished" and found the UID for the backup session, in an Href.
I pulled out the junk so I was left with a session ID in this format:
Then I was able to do a GET on backupSessions to find the status of the backup task.
As I said, I have only been fiddling with REST for a day and a half, so that may not be the best way to do it.
If there is an easier way to do it, feel free to chime in.
Users browsing this forum: No registered users and 1 guest