Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
RESTful API Reference

(POST) /cloud/tenants

Creates a new tenant account on the Veeam backup server connected to Veeam Backup Enterprise Manager.

Request

To create a new tenant account, you need to send the POST HTTP request to the URL of the /cloud/tenants resource.

HTTP Request

POST http://<Enterprise-Manager>:9399/api/cloud/tenants

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.

Accept

False

The request requires a certain format in response. In the header, the client can specify one of the following formats:

  • application/xml
  • application/json

Request Body

In the request body, the client must send parameters for the tenant account that must be created. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager RESTful API.

The client can create tenants of the following types:

Standalone Cloud Tenant Creation

The request body for the Standalone Cloud Tenant creation must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

Name

String

Name for the tenant account.

Yes

1/1

Description

String

Description for the tenant account.

Yes

0/1

Password

String

Password for the Standalone cloud tenant account.

Yes

0/1

Enabled

Boolean

Defines if the tenant account must be in the enabled or disabled state.

Yes

0/1

LeaseExpirationDate

DateTime

Defines the expiration date of the lease period for the tenant account.

Yes

0/1

BackupResource

CreateCloudTenant ResourceSpecType

Specifies options for the cloud tenant backup resources.

Yes

0/1

CloudComputeResources

CloudTenantComputeResourceCreateSpecType

Specifies options for the Cloud tenant compute resources.

Yes

0/1

BackupServerUID

URN

UID of the Veeam backup server on which the tenant account must be created.

Yes

0/1

ThrottlingEnabled

Boolean

Defines whether the bandwidth limit must be enabled for the tenant account.

Yes

0/1

ThrottlingSpeedLimit

Int

Bandwidth limit for the tenant account.

Yes

0/1

ThrottlingSpeedUnit

String

Unit for bandwidth limit that is set for the tenant account. Possible values:

  • Mbps
  • KBps
  • MBps

Yes

0/1

PublicIPCount

Int

Number of public IP addresses assigned to the tenant. Tenants can use public IP addresses to enable access to cloud VM replicas from the internet after full site failover.

Yes

0/1

MaxConcurrentTasks

Int

Maximum number of concurrent tasks for the tenant.

Yes

0/1

BackupProtectionEnabled

Boolean

Defines whether backups deleted by a tenant will be placed to the recycle bin on the service provider side.

Yes

0/1

BackupProtectionPeriod

Int

Number of days to keep deleted tenant backups in the recycle bin.

Yes

0/1

TenantType

CloudTenantType

Specifies the tenant account type:

  • Standalone
  • vCD

Yes

0/1

CloudGatewayPools

CloudGatewayPoolEntityListType

Specifes the cloud gateway pool that is assigned to the tenant account.

Yes

0/1

FailoverToOtherGatewaysIfFail

Boolean

Enables a connection to failover to cloud gateways outside of the assigned cloud gateway pool in case all cloud gateways in the pool are unavailable. Possible values:

  • True
  • False

Yes

0/1

For example:

<CreateCloudTenantSpec 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">
 <Name>CloudOrganization</Name>
 <Description/>
 <Password/>password</Password>
 <Enabled>true</Enabled>
 <LeaseExpirationDate>2099-12-31T00:00:00</LeaseExpirationDate>
 <Resources>
   <BackupResource>
     <Name>Cloud Repository</Name>
     <RepositoryUid>urn:veeam:Repository:a0f35f34-8d58-4470-b52d-071e1417732a</RepositoryUid>
     <QuotaMb>307200</QuotaMb>
   </BackupResource>
 </Resources>
 <ComputeResources>
   <ComputeResource>
     <CloudHardwarePlanUid>urn:veeam:CloudHardwarePlan:91156f8d-8bd3-44af-bec3-b6ac2ea24288</CloudHardwarePlanUid>
     <PlatformType>VMware</PlatformType>
     <UseNetworkFailoverResources>false</UseNetworkFailoverResources>
   </ComputeResource>
 </ComputeResources>
 <ThrottlingEnabled>false</ThrottlingEnabled>
 <ThrottlingSpeedLimit>1</ThrottlingSpeedLimit>
 <ThrottlingSpeedUnit>MBps</ThrottlingSpeedUnit>
 <PublicIpCount>0</PublicIpCount>
 <BackupServerUid>urn:veeam:BackupServer:8fff3b8e-c3f1-4ef5-aecc-561f07bf9982</BackupServerUid>
 <MaxConcurrentTasks>2</MaxConcurrentTasks>
 <TenantType>Standalone</TenantType>
 <CloudGatewayPools>
   <CloudGatewayPoolUid>urn:veeam:CloudGatewayPool:6de18dab-3341-441e-9184-a866913444d4</CloudGatewayPoolUid>
 </CloudGatewayPools>
 <FailoverToOthersGatewaysIfFail>true</FailoverToOthersGatewaysIfFail>
</CreateCloudTenantSpec>

vCloud Tenant Creation

The request body for the vCloud Tenant Creation must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

Name

String

Name for the vCloud tenant account. vCloud tenant account name must be equal to the vCD organization name.

Yes

1/1

Description

String

Description for the vCloud tenant account.

Yes

0/1

Enabled

Boolean

Defines if the tenant account must be in the enabled or disabled state.

Yes

0/1

LeaseExpirationDate

DateTime

Defines the expiration date of the lease period for the tenant account.

Yes

0/1

BackupResource

CreateCloudTenant ResourceSpecType

Specifies options for the cloud tenant backup resources.

Yes

0/1

BackupServerUID

URN

UID of the Veeam backup server on which the tenant account must be created.

Yes

0/1

ThrottlingEnabled

Boolean

Defines whether the bandwidth limit must be enabled for the tenant account.

Yes

0/1

ThrottlingSpeedLimit

Int

Bandwidth limit for the tenant account.

Yes

0/1

ThrottlingSpeedUnit

String

Unit for bandwidth limit that is set for the tenant account.

Yes

0/1

PublicIPCount

Int

Number of public IP addresses assigned to the tenant. Tenants can use public IP addresses to enable access to cloud VM replicas from the internet after full site failover.

Yes

0/1

MaxConcurrentTasks

Int

Maximum number of concurrent tasks for the tenant.

Yes

0/1

TenantType

CloudTenantType

Specifies the tenant account type:

  • vCD
  • Standalone

Yes

1/1

OrganizationRef

String

ID of the vCD organization. Name of the tenant must be equal to the name of this organization. Use lookup type=ORGANIZATION to get the necessary organization ID.

Yes

1/1

vCloudComputeResource

CloudTenantVCloudComputeResourceCreateSpecType

Specifies options for the vCloud tenant compute resources.

Yes

0/1

For example:

<CreateCloudTenantSpec xmlns="http://www.veeam.com/ent/v1.0">
   <Name>vCloudOrganization</Name>
   <Description>vcd tenant with backup resources</Description>
   <Enabled>false</Enabled>
   <LeaseExpirationDate>2020-07-20T02:53:01Z</LeaseExpirationDate>
   <Resources>
       <BackupResource>
           <Name>Cloud Repository for tenant</Name>
           <RepositoryUid>urn:veeam:Repository:f28f15c4-c08a-4203-aec2-269363a64765</RepositoryUid>
           <QuotaMb>10000</QuotaMb>
       </BackupResource>
   </Resources>
   <BackupServerUid>urn:veeam:BackupServer:4fef3e3c-ec06-410a-afa4-c4dc91bd6304</BackupServerUid>
   <MaxConcurrentTasks>10</MaxConcurrentTasks>
   <TenantType>VCD</TenantType>
   <OrganizationRef>urn:vCloud:Organization:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:org:219b129b-0c99-4122-b7a4-e4c8aed05bd6</OrganizationRef>
   <VCloudComputeResources>
       <VCloudComputeResource>
           <VirtualDataCenterRef>urn:vCloud:OrgVdc:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:vdc:c20a16a7-2d09-4374-850d-84b1d6c9f7f3</VirtualDataCenterRef>
           <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
           <NetworkAppliance>
               <Name>Appliance_vdc</Name>
               <ProductionNetwork>VM Network</ProductionNetwork>
               <ObtainIPAddressAutomatically>false</ObtainIPAddressAutomatically>
<ManualIpAddressSettings>
  <IpAddress>172.24.145.180</IpAddress>
  <SubnetMask>255.255.240.0</SubnetMask>
  <DefaultGateway>172.24.144.1</DefaultGateway>
<ManualIpAddressSettings>
           </NetworkAppliance>
           <WanAcceleratorUid>urn:veeam:WanAccelerator:b14583a5-d617-46e9-8edc-11617db73953</WanAcceleratorUid>
       </VCloudComputeResource>
   </VCloudComputeResources>
</CreateCloudTenantSpec>

Backup Resource Options

You can create a storage quota on the cloud repository for the created tenant account. To create a storage quota, you must define parameters for the backup resource in the Resources section of the request body. The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

Name

String

Friendly name of the cloud repository.

Yes

1/1

RepositoryUid

URN

ID of the backup repository on which the storage quota must be created, for example: urn:veeam:Repository:82db96c3-445c-4a7e-9587-f2d523e839f4

Yes

1/1

QuotaMb

Int

Size of the storage quota assigned to the user (in MB). Storage quota cannot be less than 1GB.

Yes

1/1

WanAcceleratorUid

URN

ID of the WAN accelerator that must be used as a target WAN accelerator with the cloud repository. This parameter must be specified if you want tenants to work with the cloud repository via WAN accelerators.

Yes

0/1

For example:

<Resources>
 <BackupResource>
   <Name>Cloud Repository</Name>
   <RepositoryUid>urn:veeam:Repository:a0f35f34-8d58-4470-b52d-071e1417732a
</RepositoryUid>
   <QuotaMb>307200</QuotaMb>
 </BackupResource>
</Resources>

Compute Resource Options

You can subscribe the created tenant account to a hardware plan. To subscribe a tenant to a hardware plan, you must define parameters for the compute resource in the ComputeResources section of the request body. The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

CloudHardwarePlanUid

String

ID of the hardware plan to which the tenant account must be subscribed.

Yes

1/1

WanAcceleratorUid

URN

ID of the WAN accelerator that must be used as a target WAN accelerator with the cloud host presented by the hardware plan. This parameter must be specified if you want tenants to work with cloud hosts via WAN accelerators.

Yes

0/1

PlatformType

String

Platform for which the hardware plan to which the tenant account is subscribed has been created. Possible values:

  • VMware
  • HyperV

Yes

1/1

UseNetworkFailoverResources

Boolean

Defines whether the network extension appliance must be deployed for the tenant account subscribed to the hardware plan. Possible values:

  • True
  • False

Yes

1/1

NetworkAppliance

NetworkApplianceInfoType

If UseNetworkFailoverResources option is set to True, you can pass parameters for the network extension appliance in the NetworkAppliance section of the request body. To learn more, see Network Extension Options.

Yes

0/1

For example:

<ComputeResources>
 <ComputeResource>
   <CloudHardwarePlanUid>urn:veeam:CloudHardwarePlan:91156f8d-8bd3-44af-bec3-b6ac2ea24288
</CloudHardwarePlanUid>
   <PlatformType>VMware</PlatformType>
   <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
 </ComputeResource>
</ComputeResources>

vCloud Compute Resource Options

You can assign vCloud resources to the created tenant account. To assign vCloud resources to a tenant, you must define parameters for the compute resource in the vCloudComputeResources section of the request body. The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

VirtualDataCenterRef

URN

ID of the vCloud virtual datacenter. Use lookup type=OrgVdc to get the necessary virtual datacenter ID.

Yes

1/1

UseNetworkFailoverResources

Boolean

Defines whether the network extension appliance must be deployed for the vCloud tenant account. Possible values:

  • True
  • False

Yes

1/1

NetworkAppliance

NetworkApplianceInfoType

If UseNetworkFailoverResources option is set to True, you can pass parameters for the network extension appliance in the NetworkAppliance section of the request body. To learn more, see Network Extension Options.

Yes

0/1

WanAcceleratorUid

URN

ID of the WAN accelerator that must be used as a target WAN accelerator. This parameter must be specified if you want tenants to work with vCloud hosts via WAN accelerators.

Yes

0/1

For example:

<VCloudComputeResources>
 <VCloudComputeResource>
   <VirtualDataCenterRef>urn:vCloud:OrgVdc:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:vdc:c20a16a7-2d09-4374-850d-84b1d6c9f7f3</VirtualDataCenterRef>
   <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
   <WanAcceleratorUid>urn:veeam:WanAccelerator:b14583a5-d617-46e9-8edc-11617db73953</WanAcceleratorUid>
 </VCloudComputeResource>
</VCloudComputeResources>

Network Extension Options

If you set the UseNetworkFailoverResources option in the ComputeResources section of the request body to True, you can specify settings for the network extension appliance that will be deployed for the tenant account in the SP infrastructure. The network extension appliance will act as a gateway between the SP production network and tenant VM replica network(s) providing resources for cloud VM replica failover.

You must define parameters for the network extension appliance in the NetworkAppliance section of the request body. The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

Name

String

Name for the network extension appliance.

Yes

1/1

ProductionNetwork

String

Network label that identifies the port group to which you want to connect the network extension appliance. The port group is configured on the virtual switch in the SP virtualization environment and provides networking for the Veeam Cloud Connect infrastructure.

Yes

1/1

ObtainIpAddressAutomatically

Boolean

Defines whether network settings must be configured automatically for the network extension appliance. Possible values:

  • True
  • False

If you set this option to False, you must pass network settings for the network extension appliance in the ManualIPAdressSettings section of the request body. To learn more, see Manual Ip Addressing Options.

Yes

1/1

ViDistributedSwitch

String

ID of the Distributed Virtual Switch on which the port group specified in the ProductionNetwork field is configured.

Yes

0/1

ProductionNetworkUnderDvs

Boolean

Defines whether the port group to which the network extension appliance must be connected is configured on a Distributed Virtual Switch. Possible values:

  • True
  • False

If you set this option to True, you must pass ID of the Distributed Virtual Switch in the ViDistributedSwitch element.

Yes

0/1

For example:

<NetworkAppliance>
 <Name>ApplianceDVS</Name>
 <ProductionNetwork>pd-dvPortGroup-01</ProductionNetwork>
 <ObtainIPAddressAutomatically>true</ObtainIPAddressAutomatically>
 <ViDistributedSwitchUuid>4f 4b 14 50 21 97 3e 66-32 e7 95 50 f0 83 af b3</ViDistributedSwitchUuid>
 <ProductionNetworkUnderDvs>true</ProductionNetworkUnderDvs>
</NetworkAppliance>

Manual IP Addressing Options

To assign the specific IP address to the network extension appliance, you must pass the following parameters in the ManualIpAddressSettings section of the request body:

Element

Type

Description

Modifiable

Min/Max Occurrence

IpAddress

IPv4

IP address for the network extension appliance.

Yes

1/1

SubnetMask

IPv4

Subnet mask for the network extension appliance.

Yes

1/1

DefaultGateway

IPv4

Default gateway for the network extension appliance.

Yes

1/1

For example:

<NetworkAppliance>
 <Name>Appliance</Name>
 <ProductionNetwork>pd-PortGroup-01</ProductionNetwork>
 <ObtainIPAddressAutomatically>false</ObtainIPAddressAutomatically>
 <ManualIpAddressSettings>
   <IpAddress>172.17.52.37</IpAddress>
   <SubnetMask>255.255.254.0</SubnetMask>
   <DefaultGateway>172.17.52.1</DefaultGateway>
 <ManualIpAddressSettings>
</NetworkAppliance>

Cloud Gateway Options

Specifes the cloud gateway pool to assign to the tenant account.

Element

Type

Description

Modifiable

Min/Max Occurrence

CloudGatewayPoolUid

URN

UID of the cloud gateway pool which the tenant account will use. Can be taken from /cloud/gatewayPools.

Yes

0/1

For example:

<CloudGatewayPools>
   <CloudGatewayPoolUid>urn:veeam:CloudGatewayPool:6de18dab-3341-441e-9184-a866913444d4</CloudGatewayPoolUid>
 </CloudGatewayPools>

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 vCloud tenant account on the Veeam backup server with ID 4fef3e3c-ec06-410a-afa4-c4dc91bd6304. The tenant account is assigned a storage quota on the backup repository with ID f28f15c4-c08a-4203-aec2-269363a64765 and to a virtual data center with ID e923e20c-e114-4358-90d4-363d7de928f3.

Request:

POST http://localhost:9399/api/cloud/tenants

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Request Body:

<CreateCloudTenantSpec xmlns="http://www.veeam.com/ent/v1.0">
   <Name>vCloudOrganization</Name>
   <Description>vcd tenant with backup resources</Description>
   <Enabled>false</Enabled>
   <LeaseExpirationDate>2020-07-20T02:53:01Z</LeaseExpirationDate>
   <Resources>
       <BackupResource>
           <Name>Cloud Repository for tenant</Name>
           <RepositoryUid>urn:veeam:Repository:f28f15c4-c08a-4203-aec2-269363a64765</RepositoryUid>
           <QuotaMb>10000</QuotaMb>
       </BackupResource>
   </Resources>
   <BackupServerUid>urn:veeam:BackupServer:4fef3e3c-ec06-410a-afa4-c4dc91bd6304</BackupServerUid>
   <MaxConcurrentTasks>10</MaxConcurrentTasks>
   <TenantType>VCD</TenantType>
   <OrganizationRef>urn:vCloud:Organization:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:org:219b129b-0c99-4122-b7a4-e4c8aed05bd6</OrganizationRef>
   <VCloudComputeResources>
       <VCloudComputeResource>
           <VirtualDataCenterRef>urn:vCloud:OrgVdc:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:vdc:c20a16a7-2d09-4374-850d-84b1d6c9f7f3</VirtualDataCenterRef>
           <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
           <NetworkAppliance>
               <Name>Appliance_vdc</Name>
               <ProductionNetwork>VM Network</ProductionNetwork>
               <ObtainIPAddressAutomatically>false</ObtainIPAddressAutomatically>
<ManualIpAddressSettings>
  <IpAddress>172.24.145.180</IpAddress>
  <SubnetMask>255.255.240.0</SubnetMask>
  <DefaultGateway>172.24.144.1</DefaultGateway>
<ManualIpAddressSettings>
           </NetworkAppliance>
           <WanAcceleratorUid>urn:veeam:WanAccelerator:b14583a5-d617-46e9-8edc-11617db73953</WanAcceleratorUid>
       </VCloudComputeResource>
   </VCloudComputeResources>
</CreateCloudTenantSpec>

 

Response:

202 Accepted

 

Response Body:

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

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

Request:

GET http://localhost:9399/api/tasks/task-1

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 Success

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
   <Link Rel="Related" Type="CloudTenant" Href="http://localhost:9399/api/cloud/tenants/72573c8f-0d94-48c3-aa17-c9ee6f3f7dd0?format=Entity" Name="ABC Company" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>CreateCloudTenant</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>

 

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation