REST API - POST DR Groups
This operation creates a Disaster Recovery (DR) group of virtual machines.
Request
Syntax
POST <webservice>/DRGroups HTTP/1.1
Host: <host name>
Accept: {application/xml | application/json}
Authtoken: <authentication token>
Content-type: application/xml
<create_dr_groups_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. |
XML
Download the create_dr_groups_template.xml file required for this request. The following table displays the parameters for the create_dr_groups_template.xml file.
Name |
Description |
Elements |
action |
Valid value is 0. |
Api_VirtualAppReq |
_type_ |
Type of entity. Valid value is 13, for user. |
user |
userId |
The system-generated ID assigned to the user. |
user |
userName |
The name of the user. |
user |
_type_ |
The type of entity. Valid values is 66. |
locale |
localeId |
The locale ID for the response. |
locale |
skipIdToNameConversion |
Valid values are 0,1. |
formatFlags |
isClientGroup |
Valid values are True/False. |
vApp |
operationType |
Valid values are:
|
vApp |
source |
Valid values are:
|
vApp |
version |
Valid values are:
|
vApp |
vAppName |
The name of the vApp. |
vAppEntity |
_type_ |
The type of entity. XML valid values are:
|
selectedEntities |
clientId |
The system-generated ID assigned to the client. |
selectedEntities |
entityName |
The name of the entity. |
selectedEntities |
entityId |
The ID assigned to the entity. |
selectedEntities |
_type_ |
The type of entity. Valid value is 3, for client. |
clientList |
clientName |
The name of the client. |
clientList |
backupsetId |
The ID for the backupset. |
clientList |
clientId |
The system-generated ID assigned to the client. |
clientList |
GUID |
The globally unique identifier for the virtualization client. |
clientList |
backupsetName |
The name of the backupset. |
clientList |
entityId |
The system-generated ID assigned to the entity. |
clientList |
delay |
The time (in minutes) between detecting an outage and failing over. |
vmGroups |
groupId |
The group Id for the VM. |
vmGroups |
continueOnFailure |
Option to continue powering on VMs according to priority settings after VM fails to power on. Valid values are True/False. |
vmGroups |
copyPrecedence |
The copy that takes precedence for failover. Valid values are 0,1. |
vmSequence |
replicationId |
The ID for the replication set. |
vmSequence |
vmName |
Name of the VM. |
vmInfo |
vmGUID |
GUID of the VM. |
vmInfo |
Response
Response Parameters
Parameter |
Description |
Element |
errorCode |
The possible error codes. |
errorMessage |
vAppId |
The Id of the vApp. |
entity |
vAppName |
The name of the vApp. |
entity |
Examples
Sample Request
POST <webservice>/ClientGroup HTTP/1.1
Host: client.mydomain.com
Accept: application/json
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<Api_VirtualAppReq action="0">
<processinginstructioninfo>
<user _type_="13" userId="1" userName="" />
<locale _type_="66" localeId="0" />
<formatFlags skipIdToNameConversion="1" />
</processinginstructioninfo>
<vApp isClientGroup="1" operationType="16" source="1" version="2">
<vAppEntityjobstats vAppName="TestDemoGroup" />
<selectedEntities _type_="28" clientId="7" entityId="7" entityName="vsa-vc55.testlab.company.com" />
<clientList GUID="5039ab83-15cd-0131-8769-030f6799e84b" _type_="28" backupsetId="67" backupsetName="TestACRegression" clientId="410" clientName="ACVM4" entityId="30" />
<clientList GUID="503989df-8365-717e-41a5-f1a2201085ee" _type_="28" backupsetId="67" backupsetName="TestACRegression" clientId="413" clientName="ACVM2" entityId="27" />
<clientList GUID="503992d2-c1c3-593e-ee2c-8032184c664c" _type_="28" backupsetId="67" backupsetName="TestACRegression" clientId="414" clientName="ACVM3" entityId="29" />
<config>
<vmGroups continueOnFailure="1" delay="2" groupId="1">
<vmSequence copyPrecedence="0" delay="1" replicationId="30">
<vmInfo vmGUID="5039ab83-15cd-0131-8769-030f6799e84b" vmName="ACVM4" />
</vmSequence>
<vmSequence copyPrecedence="0" delay="1" replicationId="27">
<vmInfo vmGUID="503989df-8365-717e-41a5-f1a2201085ee" vmName="ACVM2" />
</vmSequence>
<vmSequence copyPrecedence="0" delay="1" replicationId="29">
<vmInfo vmGUID="503992d2-c1c3-593e-ee2c-8032184c664c" vmName="ACVM3" />
</vmSequence>
</vmGroups>
</config>
</vApp>
</Api_VirtualAppReq>
Sample Response
This is the response when the DR group is added.
JSON
{
"resp":{
"errorMessage":"","errorCode":0
},"entity":{
"vAppId":42,"vAppName":"TestDemoGroup"
}
}
XML
<Api_VirtualAppResp>
<resp errorMessage="" errorCode="0" />
<entity vAppId="42" vAppName=" TestDemoGroup" />
</Api_VirtualAppResp>
Last modified: 1/10/2018 5:23:12 PM