This URL allocates an interface to a Sensor in child domain.
Resource URL
PUT /domain/<domain_id>/sensor/<sensor_id>/allocateinterface
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain ID | Number | Yes |
| Sensor ID | Number | Yes |
Payload Parameters:
Field Name | Description | Data Type |
|---|---|---|
| Object that contains the details of the field to be sent | Object |
Details of fields in AllocatingInterfaceElem :
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Interface ID | Number | Yes |
| VLAN ID list, should be provided when allocating an interface of VLAN type | Array of number | No |
| CIDR list, should be provided when allocating an interface of CIDR type | Array of string | No |
| List of bridge VLAN id(applicable for VM-IPS device only) | Array of string | No |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Set to 1 if the operation was successful, -1 otherwise | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/domain/103/sensor/1002/allocateinterfaces
Payload
{
"interfaceId": 115,
"vlanIdList": [8]
}
Response
{
"status": 1
}
Error Information
Following error codes are returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 404 | 1105 | Invalid domain |
2 | 404 | 1106 | Invalid Sensor |
3 | 404 | 1107 | Invalid interface or sub-interface id |
4 | 400 | 1131 | Empty VLAN id list provided |
5 | 400 | 1158 | Non numeric VLAN id(s) provided |
6 | 400 | 1159 | Duplicate VLAN id(s) provided |
7 | 400 | 1161 | Out of range VLAN id(s) provided:[VLAN id list], VLAN id should be between 1 and 4094 |
8 | 400 | 1164 | Invalid VLAN id provided |
9 | 400 | 1164 | Provided VLAN id(s) already allocated |
10 | 400 | 1130 | Empty CIDR list provided |
11 | 400 | 1701 | Invalid CIDR notation |
12 | 400 | 1137 | Duplicate CIDR entry |