enumerate restore points per vm

RESTful knowledge exchange

enumerate restore points per vm

Veeam Logoby lbonjean » Tue Aug 09, 2016 8:00 pm

Hi,

I'm trying to enumerate all restore points for a given vm.
First I want to do a query for all vm's. the hierarchyref is a required for this query to work.

Code: Select all
http://10.224.3.36:9399/api/hierarchyRoots

This is one of the results:
Code: Select all
{'Href': 'http://10.224.3.36:9399/api/hierarchyRoots/bcbe8d35-fca9-440d-a55d-e1480e8a2de4', 'Type': 'HierarchyRootReference', 'UID': 'urn:veeam:HierarchyRoot:bcbe8d35-fca9-440d-a55d-e1480e8a2de4', 'Name': 'Q01VCE002.q.lan'}


Now I try to find all vm's for this vcenter:
Code: Select all
http://10.224.3.36:9399/api/lookup?type=vm&hierarchyRef=urn:veeam:HierarchyRoot:bcbe8d35-fca9-440d-a55d-e1480e8a2de4

or
Code: Select all
http://10.224.3.36:9399/api/lookup?type=vm&hierarchyRef=bcbe8d35-fca9-440d-a55d-e1480e8a2de4


Both of them return an error 500 (also if I enclose the hierarchyref in quotes)

Code: Select all
Message="Invalid hierarchy object reference "urn:veeam:HierarchyRoot:bcbe8d35-fca9-440d-a55d-e1480e8a2de4""


Does anyone have a suggestion to correct this?
Is the hierarchyref that I use correct?

Thanks in advance,

Luc
lbonjean
Novice
 
Posts: 4
Liked: never
Joined: Fri Jul 22, 2016 8:01 am
Full Name: Luc Bonjean

Re: enumerate restore points per vm

Veeam Logoby v.Eremin » Mon Aug 22, 2016 12:51 pm 1 person likes this post

A restore points of VM having particular ref can be found in the following manner:

Code: Select all
query?type=VmRestorePoint&format=Entities&filter=HierarchyObjRef==%22"Objectref of given VM"%22


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: enumerate restore points per vm

Veeam Logoby lbonjean » Mon Sep 05, 2016 1:41 pm

This was a good solution, it now works.
lbonjean
Novice
 
Posts: 4
Liked: never
Joined: Fri Jul 22, 2016 8:01 am
Full Name: Luc Bonjean

Re: enumerate restore points per vm

Veeam Logoby v.Eremin » Mon Sep 05, 2016 2:02 pm

You're welcome. Feel free to reach us, should any additional questions arise. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to RESTful API



Who is online

Users browsing this forum: No registered users and 2 guests