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

(POST) /cloud/tenants/{ID}/subtenants

Creates a subtenant account for a tenant account with the specified ID.

Request

To create a subtenant account for a tenant, you need to send the POST HTTP request to the URL of the /cloud/tenants/{ID}/subtenants resource.

HTTP Request

POST http://<Enterprise-Manager>:9399/api/cloud/tenants/{ID}/subtenants

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 of the storage quota. 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

Name

String

User name for the subtenant account.

Yes

1/1

Description

String

Description for the subtenant account.

Yes

0/1

Password

String

Password for the subtenant account.

Yes

1/1

Enabled

Boolean

Defines if the subtenant account must be in the enabled or disabled state. Possible values:

  • True
  • False

Yes

0/1

TenantResourceId

String

ID of the tenant storage quota on which the storage quota for the subtenant account must be created, for example: 11c59670-23df-448c-a4b3-74c42669633e.

Yes

1/1

QuotaName

String

Friendly name of the storage quota assigned to the subtenant.

Yes

0/1

QuotaMb

Int

Size of the storage quota assigned to the subtenant (in MB). Subtenant quota cannot be less than 1GB. Size of the subtenant quota must be defined if the False value is specified in the UnlimitedQuota element.

Yes

0/1

UnlimitedQuota

Boolean

Defines if the storage quota assigned to the subtenant must be unlimited. Possible values:

  • True — the subquota is not limited. The subtenant can use all storage space available within the tenant quota. The subtenant quota limit specified in the QuotaMb element is ignored.
  • False — the subtenant quota is limited. Size of the subtenant quota must be defined in the QuotaMb element.

Yes

1/1

For example:

<?xml version="1.0" encoding="utf-8"?>
<CloudSubtenantCreateSpec 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 User 02</Name>
 <Description>ABC Company Laptop User</Description>
 <Password>12345678</Password>
 <Enabled>true</Enabled>
 <TenantResourceId>11c59670-23df-448c-a4b3-74c42669633e</TenantResourceId>
 <QuotaName>User1Quota</QuotaName>
 <QuotaMb>10240</QuotaMb>
 <UnlimitedQuota>true</UnlimitedQuota>
</CloudSubtenantCreateSpec>

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 subtenant account for the tenant account with ID 28ddf9b9-12fa-431a-a34c-a327f05c3920.

Request:

POST http://localhost:9399/api/cloud/tenants/28ddf9b9-12fa-431a-a34c-a327f05c3920/subtenants

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<CloudSubtenantCreateSpec 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 User 02</Name>
 <Description>ABC Company Laptop User</Description>
 <Password>12345678</Password>
 <Enabled>true</Enabled>
 <TenantResourceId>11c59670-23df-448c-a4b3-74c42669633e</TenantResourceId>
 <QuotaName>User1Quota</QuotaName>
 <QuotaMb>10240</QuotaMb>
 <UnlimitedQuota>true</UnlimitedQuota>
</CloudSubtenantCreateSpec>

 

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>AddCloudSubtenant</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" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>AddCloudSubtenant</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 Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation