REST API - POST Onboard Virtual Machine Client

Updated

This operation onboards a virtual machine client based on the GUID of the client.

Onboarding includes the following operations:

  • Verify if the VM client has any client owner. Onboarding is not allowed if the client already has an owner.

  • Assign the specified role to the user and add the user as the client owner for the VM client.

  • Verify if there are existing server plans that match the specified recovery point objectives (RPO) and storage pool settings. If there are no existing server plans that match the specified settings, the API creates a new server plan and assigns the plan to the new subclient.

  • Create a new subclient and assign the plan to the subclient.

  • Enable backup on the subclient. The subclient content is backed up based on the schedules defined in the plan.

Request

Syntax

POST <webservice>/VM/{vmGuid}/Onboard HTTP/1.1 Host: <host name> Accept: application/json Authtoken: <authentication token> Content-type: application/json <onboard vm template json>

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 Parameters

Name

Description

vmGuid

The globally unique identifier for the virtualization client. If the vmGuid is not known, use the GET VM API to retrieve it.

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 and 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 onboard_vm_template.json file required for this request. The following table displays the parameters for the onboard_vm_template.json file.

Parameter

Description

Parent Element

roleId

The system-generated ID of the role name that you want to assign to the user you plan to onboard.

role

roleName

The role name that you want to assign to the user you plan to onboard.

role

userId

The system-generated ID of the user you want to onboard.

To retrieve the ID of all the users, see REST API - GET User.

user

userName

The domain/username that you want to onboard. The user is assigned as the client owner on the client.

user

day

The value for the day when you want backups to run. You can have a value ranging from 0 to 6 that represents the days of the week.

cycleDay

startTime

The time when you want backups to start.

time

endTime

The end time for the backups.

time

StoragePool

The name of the storage pool that you want to assign to the subclient.

Api_OnboardVmClientReq

serviceLevel

The service level denotes the RPO in minutes. Valid values are:

  • Economy - 1440 minutes

  • Standard - 480 minutes

  • Premium - 240 minutes

    The server plan with RPO settings that match the service level is assigned to the subclient.

Api_OnboardVmClientReq

ForceReplace

Mandatory tag that specifies if you can overwrite the settings for the subclient. Set the value to True to apply the settings.

Api_OnboardVmClientReq

Response

Response Parameters

Parameter

Description

Element

userId

The system-generated ID of the user who is assigned as the client owner

entity

subclientName

The name of the file system subclient that you onboarded.

entity

userName

The domain/username of the user who is assigned as the client owner.

entity

Examples

Example Request

POST <webservice>/VM/502d21a1-ae8b-a75e-a0da-313df460ea03/Onboard HTTP/1.1
Host: client.mydomain.com
Accept: application/json
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/json
{ "StoragePool":"SPool2-cs", "serviceLevel":240, "ForceReplace":true, "role":{ "roleName":"Client Admins" }, "CycleDay":[ { "day":0, "time":[ { "startTime":"12AM", "endTime":"12AM" } ] }, { "day":1, "time":[ { "startTime":"8AM", "endTime":"3PM" }, { "startTime":"6PM", "endTime":"9PM" } ] } ], "user":{ "userName":"TestOrg\\user1" }
}
    

Example Response

{ "errorMessage":"OnBoarding VmClient is successful", "errorCode":0, "entity":{ "subclientId":143, "userId":5, "subclientName":"vra74test19_PREMIUM", "userName":"TestOrg\\user1" }
}