REST API - POST Virtualization Client

Updated

This operation creates a virtualization client.

Request

Syntax

POST <webservice>/Client HTTP/1.1 Host: <host name> Accept: application/xml Authtoken: <authentication token> Content-type: application/xml <create_hyperv_template.xml> <create_vmw_template.xml> <create_vcloud_template.xml>

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Headers

Name

Description

Host

The host name of the Web Server or Web Console used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Authtoken

The authentication token received after successfully logging on. For details on receiving an authentication token, see Authentication.

Content-type

The media type contained in the request body.

Request Body

Download the create_hyperv_template.xml file to create a Hyper-V client. Download the create_vmw_template.xml file to create a VMware client. The following table displays the parameters for the templates.

Name

Description

Element

Parent Element

autoCompany

Create a new company

Valid values are:

1: Associate an existing Company

2: Tenant clients

vCloudInstanceInfo

virtualServerClientProperties

clientType

The type of client.

Valid value is VIRTUAL_SERVER_CLIENT.

clientInfo

App_CreatePseudoClientRequest

vsInstanceType

The type of hypervisor instance.

Valid values are:

  • 0, for none

  • 1, for VMware

  • 2, for Hyper-V

  • 3, for Citrix Xen

  • 4, for Amazon EC2

  • 5, for Azure Classic

  • 6, for Red Hat Virtualization (RHV)

  • 7, for Azure Resource Manager

  • 9, for Nutanix Acropolis Hypervisor (AHV)

  • 10, for Oracle VM

  • 11, for OpenStack

  • 12, for Oracle Cloud Infrastructure Classic

  • 13, for Huawei FusionCompute

  • 14, for VMware Cloud Director

  • 15, for Google Cloud Platform

  • 16, for Azure Stack Hub

  • 17, for Oracle Cloud Infrastructure Classic

virtualServerInstanceInfo

virtualServerClientProperties

serverName

Hyper-V: The Hyper-V host name.

hyperV

virtualServerInstanceInfo

userName

Hyper-V: The user name of the account associated with the Hyper-V server.

credentials

hyperV

password

Hyper-V: The password associated with the Hyper-V server user account in the userName parameter.

credentials

hyperV

confirmPassword

Hyper-V: The same password used in the password parameter.

credentials

hyperV

vcenterHostName

VMware: The name of the Virtual Center.

vmwareVendor

virtualServerInstanceInfo

userName

VMware: The user name of the account associated with the Virtual Center.

virtualCenter

vmwareVendor

password

VMware: The password associated with the Virtual Center user account in the userName parameter.

virtualCenter

vmwareVendor

confirmPassword

VMware: The same password used in the password parameter.

virtualCenter

vmwareVendor

_type_

The type of CommCell object.

Valid value is CLIENT_ENTITY.

client

memberServers

clientId

The system-generated ID assigned to the proxy.

client

memberServers

clientName

Hyper-V: The name of the proxy or node used for backup operations.

VMware: The name of the proxy used for backup operations.

vCloud: The VSA proxy name.

client

memberServers

clientName

The name of the virtualization client.

entity

dApp_CreatePseudoClientRequest

vOrgName

vCloud Organization name

vCloudInstanceInfo

virtualServerClientProperties

vOrgID

vCloud organization ID

vCloudInstanceInfo

virtualServerClientProperties

domainName

The name of the company that will be created on the Commvault software.

shortName

organization

adminInstanceId

ID of the vCloud admin account

adminInstanceInfo

virtualServerInstanceInfo

attributeValue

CSID:CSHostName

customAttributes

clientInfo

Response

Response Parameters

Parameter

Description

Element

errorCode

The possible error codes.

Valid values are:

  • 0, successful completion

  • 1001, The object cannot be created

  • 1002, The vCenter type is not specified

  • 1003, The vCenter host name is not specified

  • 1004, The vCenter user credentials are not specified or are incorrect

  • 1005, The proxy client is not specified

  • 1006, The user name is not specified

  • 1007, Failed to validate the virtual server credentials

  • 1008, Indicates an exception error with an error string

  • 1009, An unsupported vendor type was sent

  • 1010, A Hyper-V server is not specified so the credentials cannot be validated

response

errorString

The description of the error code. Not all error codes have an error string.

response

Examples

Sample Request

This request creates a Hyper-V client.

POST <webservice>/Client HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<App_CreatePseudoClientRequest>
  <clientInfo clientType="VIRTUAL_SERVER_CLIENT">
    <virtualServerClientProperties>
      <virtualServerInstanceInfo vsInstanceType="2">
        <hyperV serverName="DOCLABHVHOST.mycompany.com">
          <credentials userName="administrator" password="UDl1NDU4OQ==" confirmPassword="UDl1NDU4OQ==" />
        </hyperV>
        <associatedClients>
          <memberServers>
            <client _type_="CLIENT_ENTITY" clientName="client001" clientId="4795" />
          </memberServers>
        </associatedClients>
      </virtualServerInstanceInfo>
    </virtualServerClientProperties>
  </clientInfo>
  <entity clientName="client001" />
</App_CreatePseudoClientRequest>
    

This request creates a VMware client.

POST <webservice>/Client HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<App_CreatePseudoClientRequest>
  <clientInfo clientType="VIRTUAL_SERVER_CLIENT">
    <virtualServerClientProperties>
      <virtualServerInstanceInfo vsInstanceType="1">
        <vmwareVendor vcenterHostName="DOCLABHVHOST.mycompany.com">
          <virtualCenter userName="vsauser" password="dGVzdHBhc3N3b3Jk" confirmPassword="dGVzdHBhc3N3b3Jk" />
        </vmwareVendor>
        <associatedClients>
          <memberServers>
            <client _type_="CLIENT_ENTITY" clientId="45" clientName="client001"/>
          </memberServers>
          <memberServers>
            <client _type_="CLIENT_ENTITY" clientId="51" clientName="client002"/>
          </memberServers>
        </associatedClients>
      </virtualServerInstanceInfo>
    </virtualServerClientProperties>
  </clientInfo>
  <entity clientName="DOCLABHVHOST.commvault.com"/>
</App_CreatePseudoClientRequest>
    

Sample Response

This is the response when the request is successful.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<App_CreatePseudoClientResponse>
  <response errorCode="0">
    <entity _type_="0" clientId="4778" clientName="client001" clientSidePackage="1" consumeLicense="1" 
type="0"/>
  </response>
</App_CreatePseudoClientResponse>
    

This is a sample response when the request is not successful.

<App_CreatePseudoClientResponse>  <response errorString="VCenter host name is not specified" errorCode="1003">   <entity />  </response>
</App_CreatePseudoClientResponse>