RESTful knowledge exchange
Post Reply
Markus.K1985
Veeam Vanguard
Posts: 96
Liked: 27 times
Joined: Dec 08, 2014 2:30 pm
Full Name: Markus Kraus
Contact:

Ent. Manager API - query for VmRestorePoint

Post by Markus.K1985 »

Hello,

I am currently working on a script that uses the Ent. Manger API to identify all restore points for a vSphere VM.

The query service is behaving strangely and returning restore points outside the scope of the filter.

Restore Points from QuerySvc:

Code: Select all

/api/query?type=VmRestorePoint&VmDisplayName=MyCustomName2"

/api/vmRestorePoints/d5a011a9-e2da-4d2b-ba2d-2b1889047c34
/api/vmRestorePoints/d90df9c4-822f-40d9-ba66-994ce1f95e28
/api/vmRestorePoints/8684af08-f9b2-4c49-b83a-d112e7dc18ee
/api/vmRestorePoints/22040970-29aa-4626-83ff-d28e5e059175
I have done another Call to get the Details of each Restore Point:

Code: Select all

/api/vmRestorePoints/...?format=Entity"

VmName        Href
------        ----
MyCustomName2 /api/vmRestorePoints/d5a011a9-e2da-4d2b-ba2d-2b1889047c34?format=Entity
MyCustomName2 /api/vmRestorePoints/d90df9c4-822f-40d9-ba66-994ce1f95e28?format=Entity
OtherName2    /api/vmRestorePoints/8684af08-f9b2-4c49-b83a-d112e7dc18ee?format=Entity
MyCustomName2 /api/vmRestorePoints/22040970-29aa-4626-83ff-d28e5e059175?format=Entity
What is the problem here?
- Both VMs are in the same Backup Job
- latest v11 Build

oleg.feoktistov
Veeam Software
Posts: 1503
Liked: 495 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Ent. Manager API - query for VmRestorePoint

Post by oleg.feoktistov »

Hello Markus,

Please have a look at how the query is formed in the example here. Notice that you need to insert filter statement before incorporating a search by properties. If filter query is inserted incorrectly, it is just being ignored.

Thanks,
Oleg

Markus.K1985
Veeam Vanguard
Posts: 96
Liked: 27 times
Joined: Dec 08, 2014 2:30 pm
Full Name: Markus Kraus
Contact:

Re: Ent. Manager API - query for VmRestorePoint

Post by Markus.K1985 »

Thanks Oleg, I now see my mistake

Is my assumption correct that using the query service is much faster than collecting and filtering all restore points?

oleg.feoktistov
Veeam Software
Posts: 1503
Liked: 495 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Ent. Manager API - query for VmRestorePoint

Post by oleg.feoktistov » 1 person likes this post

If the goal is to search, not represent each entity, it is faster as it filters out restore points on server side using precise parameters. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests