Veeam Backup & Replication 10
Veeam RESTful API Reference
Related documents

(POST) /cloud/hardwarePlans

Configures a new hardware plan on the Veeam backup server connected to Veeam Backup Enterprise Manager.

Request

To create a new hardware plan, you need to send the POST HTTP request to the URL of the /cloud/hardwarePlans resource.

HTTP Request

POST https://<Enterprise-Manager>:9398/api/cloud/hardwarePlans

Request Header

The request contains the following headers:

Header

Required

Description

X-RestSvcSessionId

True

The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. To learn more, see Authentication and Security.

Content-Type

True

Identifies the format of the request body message. Possible values:

  • application/xml
  • application/json

Accept

False

Identifies the format of the response. Possible values:

  • application/xml — the client can send this value in the header to accept response in the XML format.
  • application/json — the client must send this value in the header to accept the request in the JSON format.

If the request does not contain the header, the server will return the response in the XML format.

Request Body

In the request body, the client must send parameters for the new hardware plan. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager RESTful API.

The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

BackupServerUid

String

UID of the Veeam backup server on which the hardware plan must be created.

Yes

1/1

Name

String

Name for the hardware plan, for example: VMware Hardware Plan.

Yes

1/1

Description

String

Description for the hardware plan.

Yes

0/1

ProcessorUsageLimitMhz

Int

Limit of CPU that can be used by all VM replicas of the tenant subscribed to the hardware plan.

To let the replicas use all available CPU resources, set the value to -1.

Yes

1/1

MemoryUsageLimitMb

Int

Limit of RAM that can be used by all VM replicas of the tenant subscribed to the hardware plan.

To let the replicas use all available RAM resources, set the value to -1.

Yes

1/1

HardwarePlanDetails

ViCloudHardwarePlan or HvCloudHardwarePlan

Parameters for the created hardware plan. To learn more about creating a VMware hardware plan, see VMware Hardware Plan Settings. To learn more about creating a Hyper-V hardware plan, see Hyper-V Hardware Plan Settings.

Yes

1/1

For example:

<?xml version="1.0" encoding="utf-8"?>
<CloudHardwarePlanCreateSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <BackupServerUid>urn:veeam:BackupServer:8fff3b8e-c3f1-4ef5-aecc-561f07bf9982</BackupServerUid>
 <Name>VMware Gold</Name>
 <Description>Hardware Plan for VMware</Description>
 <ProcessorUsageLimitMhz>10000</ProcessorUsageLimitMhz>
 <MemoryUsageLimitMb>20000</MemoryUsageLimitMb>
 <HardwarePlanDetails>
   <ViCloudHardwarePlan>
     <HypervisorHostRef>urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438</HypervisorHostRef>
     <ParentType>HostSystem</ParentType>
     <ParentName>esx01.tech.local</ParentName>
     <Datastores>
       <Datastore>
         <FriendlyName>Cloud Replicas</FriendlyName>
         <DatastoreType>Datastore</DatastoreType>
         <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
         <QuotaGb>500</QuotaGb>
       </Datastore>
     </Datastores>
     <Network>
       <CountWithInternet>1</CountWithInternet>
       <CountWithoutInternet>0</CountWithoutInternet>
     </Network>
   </ViCloudHardwarePlan>
 </HardwarePlanDetails>
</CloudHardwarePlanCreateSpec>

VMware Hardware Plan Settings

You can define the following parameters for the VMware hardware plan:

Element

Type

Description

Modifiable

Min/Max Occurrence

HypervisorHostRef

URN

UID of the virtualization host on which tenant VM replicas should be registered, for example: urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438.

Yes

1/1

ParentType

String

Type of the VMware object. Possible values:

  • ClusterComputeResource
  • HostSystem

Yes

1/1

ParentName

String

Name of the host or cluster.

Yes

1/1

Datastores

ViCloudHardwarePlanDatastoreInfoListType

Datastore parameters for the created hardware plan. To learn more, see Datastore Settings.

Yes

1/1

Network

CloudHardwarePlanNetworkInfo

Network parameters for the created hardware plan. To learn more, see Network Settings.

Yes

0/1

 

(POST) /cloud/hardwarePlansNote:

VMware hardware plan settings must be defined in the ViCloudHardwarePlan section of the request body.

For example:

<ViCloudHardwarePlan>
 <HypervisorHostRef>urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438</HypervisorHostRef>
 <ParentType>HostSystem</ParentType>
 <ParentName>esx01.tech.local</ParentName>
 <Datastores>
   <Datastore>
     <FriendlyName>Cloud Replicas</FriendlyName>
     <DatastoreType>Datastore</DatastoreType>
     <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
     <QuotaGb>500</QuotaGb>
   </Datastore>
 </Datastores>
 <Network>
   <CountWithInternet>1</CountWithInternet>
   <CountWithoutInternet>0</CountWithoutInternet>
 </Network>
</ViCloudHardwarePlan>

Datastore Settings

You can define the following datastore parameters for the VMware hardware plan:

Element

Type

Description

Modifiable

Min/Max Occurrence

FriendlyName

String

Name of the datastore as displayed to the tenant, for example: Cloud Replicas.

Yes

1/1

DatastoreType

String

Type of the datastore. Possible values:

  • Datastore
  • StoragePod

Yes

1/1

Reference

HierarchyObjRefType

Reference to the datastore on which tenant VM replicas should be stored, for example: urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441.

Yes

1/1

QuotaGb

Int

Storage quota for tenant VM replicas on the datastore (in GB).

Yes

1/1

For example:

<Datastores>
 <Datastore>
   <FriendlyName>Cloud Replicas</FriendlyName>
   <DatastoreType>Datastore</DatastoreType>
   <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
   <QuotaGb>500</QuotaGb>
 </Datastore>
</Datastores>

Hyper-V Hardware Plan Settings

You can define the following parameters for the for the Hyper-V hardware plan:

Element

Type

Description

Modifiable

Min/Max Occurrence

HypervisorHostRef

HierarchyObjRefType

UID of the virtualization host on which tenant VM replicas should be registered, for example: urn:HyperV:Host:849a937a-3416-4f03-8111-67b06393afcb.

Yes

1/1

Volumes

HvCloudHardwarePlanVolumesInfoListType

Storage volume parameters for the created hardware plan. To learn more, see Volume Settings.

Yes

1/1

Network

CloudHardwarePlanNetworkInfo

Network parameters for the created hardware plan. To learn more, see Network Settings.

Yes

0/1

 

(POST) /cloud/hardwarePlansNote:

Hyper-V hardware plan settings must be defined in the HvCloudHardwarePlan section of the request body.

For example:

<HvCloudHardwarePlan>
 <HypervisorHostRef>urn:HyperV:Host:849a937a-3416-4f03-8111-67b06393afcb.</HypervisorHostRef>
 <Volumes>
   <Volume>
     <FriendlyName>Cloud Replicas</FriendlyName>
     <VolumePath>D:\Replicas</VolumePath>
     <QuotaGb>300</QuotaGb>
   </Volume>
 </Volumes>
 <Network>
   <CountWithInternet>1</CountWithInternet>
   <CountWithoutInternet>1</CountWithoutInternet>
 </Network>
</HvCloudHardwarePlan>

Volume Settings

You can define the following storage volume parameters for the Hyper-V hardware plan:

Element

Type

Description

Modifiable

Min/Max Occurrence

FriendlyName

String

Name of the volume as displayed to the tenant, for example: Cloud Replicas.

Yes

1/1

VolumePath

String

Path to a folder on the volume in which tenant VM replica files should be stored.

Yes

1/1

QuotaGb

Int

Storage quota for tenant VM replicas on the volume (in GB).

Yes

1/1

For example:

<Volumes>
 <Volume Id="66d75e14-a35a-4dfe-a919-9b2a3bf87e4a">
   <FriendlyName>Cloud Replicas</FriendlyName>
   <VolumePath>D:\Replicas</VolumePath>
    <QuotaGb>300</QuotaGb>
 </Volume>
</Volumes>

Network Settings

You can define the following network parameters for the VMware or Hyper-V hardware plan:

Element

Type

Description

Modifiable

Min/Max Occurrence

CountWithInternet

Int

Number of networks with internet access that will be available to tenant VM replicas.

Yes

0/1

CountWithoutInternet

Int

Number of networks without internet access that will be available to tenant VM replicas.

Yes

0/1

For example:

<Network>
 <CountWithInternet>1</CountWithInternet>
 <CountWithoutInternet>1</CountWithoutInternet>
</Network>

Query Parameters

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 202 Accepted.

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the request body message. Possible values:

  • application/xml
  • application/json

Response Body

None.

Example

The example below creates a VMware hardware plan on the Veeam backup server with ID 8fff3b8e-c3f1-4ef5-aecc-561f07bf9982.

Request:

POST https://localhost:9398/api/cloud/hardwarePlans

 

Request Headers:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Content-Type         application/xml

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<CloudHardwarePlanCreateSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <BackupServerUid>urn:veeam:BackupServer:8fff3b8e-c3f1-4ef5-aecc-561f07bf9982</BackupServerUid>
 <Name>VMware Gold</Name>
 <Description>Hardware Plan for VMware</Description>
 <ProcessorUsageLimitMhz>10000</ProcessorUsageLimitMhz>
 <MemoryUsageLimitMb>20000</MemoryUsageLimitMb>
 <HardwarePlanDetails>
   <ViCloudHardwarePlan>
     <HypervisorHostRef>urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438</HypervisorHostRef>
     <ParentType>HostSystem</ParentType>
     <ParentName>esx01.tech.local</ParentName>
     <Datastores>
       <Datastore>
         <FriendlyName>Cloud Replicas</FriendlyName>
         <DatastoreType>Datastore</DatastoreType>
         <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
         <QuotaGb>500</QuotaGb>
       </Datastore>
     </Datastores>
     <Network>
       <CountWithInternet>1</CountWithInternet>
       <CountWithoutInternet>0</CountWithoutInternet>
     </Network>
   </ViCloudHardwarePlan>
 </HardwarePlanDetails>
</CloudHardwarePlanCreateSpec>

 

Response:

202 Accepted

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="https://localhost:9398/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Running</State>
 <Operation>CreateCloudGateway</Operation>
</Task>

To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:

Request:

GET https://localhost:9398/api/tasks/task-1

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 OK

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="https://localhost:9398/api/tasks/task-1" />
   <Link Rel="Related" Type="CloudGateway" Href="https://localhost:9398/api/cloud/gateways/917be225-6744-4777-8096-cbabaec55006?format=Entity" Name="" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>CreateCloudHardwarePlan</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>

 

This Document Help Center
User Guide for VMware vSphereUser Guide for Microsoft Hyper-VVeeam Backup Enterprise Manager GuideVeeam Agent Management GuideVeeam Cloud Connect GuideVeeam Explorers User GuideVeeam Plug-ins for Enterprise Applications GuideIntegration with Veeam Backup for AWS User GuideVeeam PowerShell ReferenceVeeam Explorers PowerShell ReferenceVeeam RESTful API ReferenceRequired Permissions for VMware vSphereQuick Start Guide for VMware vSphereQuick Start Guide for Microsoft Hyper-VVeeam ONE DocumentationVeeam Agent for Windows DocumentationVeeam Agent for Linux DocumentationVeeam Backup for AWS DocumentationVeeam Backup for Microsoft Azure DocumentationVeeam Backup for Nutanix AHV User GuideVeeam Backup for Microsoft Office 365 DocumentationVeeam Management Pack Documentation
I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.