RESTful knowledge exchange
Post Reply
eeldivad
Novice
Posts: 6
Liked: never
Joined: Apr 23, 2019 3:43 pm
Full Name: David Lee
Contact:

How to get list of Machines view

Post by eeldivad » Apr 29, 2019 9:25 pm

When we login to Veeam Backup Enterprise manager web portal, there is a tab for "Machines". This view shows me all machines being backed up and last successful backup and other useful information. How can I get this information using the REST API? I've spent a lot of time going through the REST documentation but there's not enough useful examples to follow that would allow me to get this. Has anyone tried and would be nice enough to share their code?

I tried using powershell but I'd have to connect to every backup server and run multiple commands and could end up taking several minutes to return this view. I was able to figure out the stored procedure used to get this view

exec [dbo].[usp.GridReport.DataSrc.VmInBackups] @attributesXml=N'<?xml version="1.0"?><attributes><attr name="userSid" value="AQUAAAAAAAUVAAAA6ZjJ3HxKikVJ5tldqzEAAA==" /></attributes>',@filtersXml=N'<filters><text_filter id="vm_name"><value></value></text_filter></filters>',@ordersXml=N'<orders><order id="vm_name" sort="asc" /></orders>',@start=0,@limit=999999

So running this sproc against the veeambackupreporting database directly will give me what I want within a few seconds but I know this is not the preferred method. If anyone can tell me how to get this info through REST API, I would prefer to go that route.

Thanks

benyoung
Service Provider
Posts: 121
Liked: 32 times
Joined: May 25, 2016 3:29 am
Full Name: Ben Young
Contact:

Re: How to get list of Machines view

Post by benyoung » Apr 29, 2019 11:58 pm

I had a similar challenge with a protection dashboard for our portal. I ended up going a more simple route since we were already talking directly to vSphere for the other vm data / guest info in the same view.

The solution i ran with was having Veeam publish through to the vm annotation/notes upon successful backup and just parse/read that out at the same time.

You could however

Use the querySvc and pull out the available restore points, if you have the list of VM's you want to process you can combine this with a filter name==XXX to speed each call up if you prefer not to parse a large list as in a busy environment this tends to be quite slow. Not sure you can sort by CreationTimeUTC when i last checked just told you that field was invalid. try in the latest version though this may have changed

Or you could parse the last few jobsessions and pull out the list of successful includes / VMs that way

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest