This URL adds a new device in the specified domain.
Resource URL
PUT /domain/<domain_id>/device/<device_id>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Device Id | Number | Yes |
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique device id, not required for POST | String | Yes |
| Device name | String | Yes |
| Device type can be IPSNACSensor/ virtualHIPSensor/ NTBAAppliance/ loadBalancer | Object | Yes |
| Contact information for the device | String | No |
| Device location | String | No |
| Last modified time of the device | String | No |
Details of IPSNACSensor:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Device shared secret key | String | Yes |
| Device confirmed shared secret key | String | Yes |
| Update mode can be ONLINE/ OFFLINE/ UNKNOWN | String | Yes |
Details of virtualHIPSensor:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Device shared secret key | String | Yes |
| Device confirmed shared secret key | String | Yes |
Details of NTBAAppliance:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Device shared secret key | String | Yes |
| Device confirmed shared secret key | String | Yes |
Details of loadBalancer:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| IP address | String | Yes |
| SNMP user name | String | Yes |
| Authentication password | String | Yes |
| Privacy password | String | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Unique id of the created device | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/domain/0/device/1006
{
"deviceId": 1006,
"deviceName": "Load_BALANCER",
"deviceType": {
"virtualHIPSensor": null,
"loadBalancer": {
"ipAddress": "1.1.1.1",
"SNMPv3User": "SNMP",
"authenticationPassword": "admin123",
"privacyPassword": "admin123"
}
},
"contactInformation": "ContactInform",
"location": "Location",
"LastModifiedTime": "Mon Jul 22 20:05:00 IST 2013"
}
Response
{
"status":1
}
Error Information
Following error codes are returned by this URL:
S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 404 | 1105 | Invalid domain |
2 | 400 | 4601 | Device name is required |
3 | 400 | 4602 | Device name should not be greater than 25 chars |
4 | 400 | 4603 | Shared secret is required |
5 | 400 | 4604 | Confirm shared secret is required |
6 | 400 | 4605 | Shared secret does not match |
7 | 400 | 4606 | Device name cannot be modified |
8 | 400 | 4607 | Update mode is required |
9 | 404 | 4608 | Invalid device id /device not visible in this domain |
10 | 400 | 4609 | SNMPv3 username is required |
11 | 400 | 4610 | Authentication password is required |
12 | 400 | 4611 | Privacy password is required |
13 | 400 | 4612 | Password should not be less than 8 chars |
14 | 400 | 4613 | Name must contain only letters, numerical, dot, hyphens or underscore |
15 | 400 | 4614 | Device name already exists |
16 | 400 | 4615 | IP address already exists |
17 | 400 | 4616 | Device profile provided is not up to date |
18 | 400 | 4617 | Location should not be greater than 25 chars |
19 | 400 | 4618 | Location must contain only letters, numerical, dot, hyphens or underscore |
20 | 400 | 4619 | Contact should not be greater than 25 chars |
21 | 400 | 4620 | Location must contain only letters, numerical, dot, hyphens or underscore |
22 | 400 | 4621 | Shared secret should not be greater than 25 chars |