This operation installs a new Windows or Unix client with all necessary agents and packages, or installs packages with necessary agents on existing Windows or Unix clients. This API allows you to create a pseudoclient, associate a plan, add content, and install packages on a new client or an existing client.
Request
Syntax
POST <webservice>/InstallClient
Host: <host name>
Content-Type: application/json
Accept: application/json
Authtoken: <authentication token>
<install_client_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 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 format of the body of the request. Valid values are: application/xml or application/json. |
Request Body
Download the JSON file required for this request: install_client_template.json. The following table displays the parameters for the request body.
Parameters | Description | Elements | |||
---|---|---|---|---|---|
registerClient | The flag to register the client. Valid values are:
| createPseudoClientRequest | |||
clientInfo | The information of the client. | createPseudoClientRequest | |||
clientType | The type of the client. Valid values are:
| clientInfo | |||
planId | The ID of the plan that you want to associate with the client. | plan | |||
plan | The plan that that you want to associate with the client. | clientInfo | |||
fsSubClientProp | The properties of the subclient. | subclientInfo | |||
useGlobalFilters | Indicates whether global filters can be used. Valid values are:
| fsSubClientProp | |||
backupSystemState | Indicates whether system state backup can be used. Valid values are:
| fsSubClientProp | |||
useLocalContent | Indicates whether local content can be used. Valid values are:
| subclientInfo | |||
contentOperationType | The type of operation to perform on the content. Valid values are:
| subclientInfo | |||
content | The content that is available on the client. | subclientInfo | |||
path | The location of the content. | content | |||
excludePath | The path of the content to exclude from the operations, such as backup and restore. | content | |||
includePath | The path of the content to include from the operations, such as backup and restore. | content | |||
packageId | The ID of the software package. Valid values are:
| packages | |||
packageName | The name of the software package. | packages | |||
userName | The user name of the user who is authorized to run the job. | clientAuthForJob | |||
password | The password for the user name. | clientAuthForJob | |||
clientId | The ID of the client. | entities | |||
clientName | The name of the client | entities | |||
hostName | The host name of the client. | entities |
Response
Response Parameters
Parameter | Description |
---|---|
jobId | The ID of the job. |
taskId | The system-generated ID assigned for the task. |
errorCode | The possible error code. Valid values are:
|
Examples
Example Request
This request installs a new client.
POST <webservice>/InstallClient
Host: client.mydomain.com
Accept: application/json
Authtoken: QSDK 3c633bc300b7cbdcf31f918d4ce4934722d620774b81e87e543c517177302b23a0742c0b7e74bd7dc43731ca2b83fe44a43b5fcb24633fab54842eaeb8ddaa6d85674a17692ea6cd559b1d70a4f589552e59c10fc79701debf79d85cda
Content-Type: application/json
{
"rebootClient": false,
"createPseudoClientRequest": {
"registerClient": true,
"clientInfo": {
"clientType": 0,
"plan": {
"planId": 1
},
"subclientInfo": {
"fsSubClientProp": {
"useGlobalFilters": "USE_CELL_LEVEL_POLICY",
"backupSystemState": true
},
"useLocalContent": true,
"contentOperationType": 1,
"content": [
{
"path": "[file://%25Office%25]\\%Office%"
},
{
"path": "D:\\UpdateAdminConsole\\Webcontent"
},
{
"path": "[file://%25Desktop%25]\\%Desktop%"
},
{
"path": "[file://%25Documents%25]\\%Documents%"
},
{
"path": "[file://%25Music%25]\\%Music%"
},
{
"path": "[file://%25Pictures%25]\\%Pictures%"
},
{
"path": "[file://%25Videos%25]\\%Videos%"
},
{
"excludePath": "[file://%25Home%25]\\%Home%"
},
{
"excludePath": "[file://%25Archives%25]\\%Archives%"
},
{
"excludePath": "[file://%25Cloud%20app%25]\\%Cloud app%"
},
{
"excludePath": "C:\\excludeContent"
},
{
"includePath": "C:\\ExceptionContent"
}
]
}
}
},
"packages": [
{
"packageId": 702,
"packageName": "File System"
}
],
"clientAuthForJob": {
"userName": "manoj\\administrator",
"password": "cXE="
},
"entities": [
{
"clientId": 0,
"clientName": "TestInstallClient1",
"hostName": "TestInstallClient1.manoj.com"
},
{
"clientId": 0,
"clientName": "TestInstallClient2",
"hostName": "TestInstallClient2.manoj.com"
}
]
}
This request associates a new plan and additional content to an existing client.
POST <webservice>/InstallClient
Host: client.mydomain.com
Accept: application/json
Authtoken: QSDK 3c633bc300b7cbdcf31f918d4ce4934722d620774b81e87e543c517177302b23a0742c0b7e74bd7dc43731ca2b83fe44a43b5fcb24633fab54842eaeb8ddaa6d85674a17692ea6cd559b1d70a4f589552e59c10fc79701debf79d85cda
Content-Type: application/json
{
"rebootClient": false,
"createPseudoClientRequest": {
"registerClient": true,
"clientInfo": {
"clientType": 0,
"plan": {
"planId": 1
},
"subclientInfo": {
"fsSubClientProp": {
"useGlobalFilters": "USE_CELL_LEVEL_POLICY",
"backupSystemState": true
},
"useLocalContent": true,
"contentOperationType": 1,
"content": [
{
"path": "[file://%25Office%25]\\%Office%"
},
{
"path": "D:\\UpdateAdminConsole\\Webcontent"
},
{
"path": "[file://%25Desktop%25]\\%Desktop%"
},
{
"path": "[file://%25Documents%25]\\%Documents%"
},
{
"path": "[file://%25Music%25]\\%Music%"
},
{
"path": "[file://%25Pictures%25]\\%Pictures%"
},
{
"path": "[file://%25Videos%25]\\%Videos%"
},
{
"excludePath": "[file://%25Home%25]\\%Home%"
},
{
"excludePath": "[file://%25Archives%25]\\%Archives%"
},
{
"excludePath": "[file://%25Cloud%20app%25]\\%Cloud app%"
},
{
"excludePath": "C:\\excludeContent"
},
{
"includePath": "C:\\ExceptionContent"
}
]
}
}
},
"packages": [
{
"packageId": 702,
"packageName": "File System"
}
],
"clientAuthForJob": {
"userName": "manoj\\administrator",
"password": "cXE="
},
"entities": [
{
"clientId": 127,
"clientName": "Test3",
"hostName": "Test3.manoj.com"
},
{
"clientId": 128,
"clientName": "Test4",
"hostName": "Test4.manoj.com"
}
]
}
Example Response
{
"jobId": 14578,
"taskId": 248,
"response": {
"errorCode": 0
}
}