list the VMs of a host

RESTful knowledge exchange

list the VMs of a host

Veeam Logoby sirinech » Fri Apr 11, 2014 8:04 am

How do I get the list of VMs in a host /HierarchyRoots even if the VMs were never added to jobs before?
sirinech
Influencer
 
Posts: 23
Liked: 1 time
Joined: Fri Mar 21, 2014 3:06 pm
Full Name: sirine chadly

Re: list the VMs of a host

Veeam Logoby nefes » Fri Apr 11, 2014 8:10 am

Please take a look at Lookup Service, it should help you to find VM you need
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: list the VMs of a host

Veeam Logoby sirinech » Fri Apr 11, 2014 9:02 am

I already did but every type it gives me back a bad request saying not enough parameters, and the type=Vm is there such a type in this API?
sirinech
Influencer
 
Posts: 23
Liked: 1 time
Joined: Fri Mar 21, 2014 3:06 pm
Full Name: sirine chadly

Re: list the VMs of a host

Veeam Logoby v.Eremin » Fri Apr 11, 2014 9:07 am

Yes, the VM type is present in all 3 environments (vSphere , VCD, Hyper-V). Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: list the VMs of a host

Veeam Logoby nefes » Fri Apr 11, 2014 9:12 am

How do you construct your request?
Generally it should be in http://localhost:9399/api/lookup?host={hostUID}&name=(objectName)&type=(objectType) form.
Detailed information about names and types can be found in user guide.
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: list the VMs of a host

Veeam Logoby sirinech » Fri Apr 11, 2014 9:13 am

Thank you it works now :)
sirinech
Influencer
 
Posts: 23
Liked: 1 time
Joined: Fri Mar 21, 2014 3:06 pm
Full Name: sirine chadly


Return to RESTful API



Who is online

Users browsing this forum: No registered users and 2 guests