REST API knowledge exchange
Post Reply
arif
Novice
Posts: 8
Liked: 2 times
Joined: Mar 25, 2020 2:31 pm
Full Name: Arif Cetiner
Contact:

Datastore ObjectID Issue

Post by arif »

Hello,

We are performing the Start Entire VM Restore operation using the Veeam Swagger API.

For this, we use the following endpoint:

https://helpcenter.veeam.com/docs/backu ... toreVmware

We are experiencing an issue in the Datastore section.

When we send as below, it tries to go to the disk of the source server where the backup is. It cannot find the disk of the target server:

Code: Select all

"datastore": {
  "diskType": "Source"
},

It expects us to write it in full. Like this:

Code: Select all

"datastore": {
  "datastore": {
    "hostName": "string",
    "name": "string",
    "type": "Unknown",
    "objectId": "string"
  },
  "diskType": "Source"
},

How can we obtain the objectId parameter here?
I can find the storage id by going to the disk via the ESXi Host, but is there a way in Swagger or Veeam REST API to get this data?

When I initiate the restore through the program, it automatically finds the disk, but from the API, it specifically expects the objectId for the datastore.
oleg.feoktistov
Veeam Software
Posts: 2021
Liked: 673 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Datastore ObjectID Issue

Post by oleg.feoktistov »

Hi,

I assume you are referring to VBR REST v1.1-rev0 ? If that's the case, I just tested it and it works with just the request below:

Code: Select all

{
  "objectRestorePointId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "Customized",
  "datastore": {
    "diskType": "Source"
  }
}
As for datastore objectId, you can obtain it through querying the needed datastore with POST /api/v1/inventory/vmware/hosts/{name}. ObjectId should be in the datastore response model.
Use either DatastoresAndVms or HostsAndDatastores hierarchyTypeFilter.

Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests