This is an archive version of the document. To get the most up-to-date information, see the current version.

(POST) /cloud/tenants

In this article

    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.

    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 request body must contain the following elements:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    BackupServerIdOr
    Name

    String

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

    This parameter is supported by previous versions of Veeam Backup Enterprise Manager RESTful API. In current version of RESTful API, it is recommended that the new BackupServerUid parameter is used in the request body.

    No

    1/1

    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 tenant account.

    Yes

    1/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

    ThrottlingEnabled

    Boolean

    Defines whether the bandwith 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

    BackupServerUID

    URN

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

    Yes

    0/1

    For example:

    <?xml version="1.0" encoding="utf-8"?>
    <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>ABC Company<Name>
     <Description>Tenant account for ABC Company</Description>
     <Password>1234</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>
    </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.

    Yes

    1/1

    For example:

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

    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: application/xml.

    Response Body

    None.

    Example

    The example below creates a tenant account on the Veeam backup server with ID 8fff3b8e-c3f1-4ef5-aecc-561f07bf9982. The tenant account is assigned a storage quota on the backup repository with ID a0f35f34-8d58-4470-b52d-071e1417732a and subscribed to the hardware plan with ID 91156f8d-8bd3-44af-bec3-b6ac2ea24288.

    Request:

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

     

    Request Header:

    X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

     

    Request Body:

    <?xml version="1.0" encoding="utf-8"?>
    <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>ABC Company<Name>
     <Description>Tenant account for ABC Company</Description>
     <Password>1234</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>
    </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>