This URL adds a non-standard port on the specified Sensor.
Resource URL
POST /sensor/<sensor_id>/nonstandardports
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Sensor id | Number | Yes |
Payload Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Non-standard port details | Object | Yes |
Details of NonStandardPortRequestElement:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Application protocol, can be TELNET / FTP / SMTP / DNS / HTTP / POP3 / RPC / IMAP / SNMP / LDAP / REXEC / RLOGIN / RSH / NFS | String | Yes |
| SSL to be enabled for HTTP protocol, for other protocols this field must be false | Boolean | Yes |
| Transport protocol, can be TCP / UDP | String | Yes |
| Non-standard port number, should not be set to the standard port numbers defined for the protocols | Number | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Status returned | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/sensor/1002/nonstandardports
Payload
{
"protocol": "HTTP",
"sslEnabled": "true",
"transport": "UDP",
"nonStandardPortNumber": "63"
}
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 | 1106 | Invalid Sensor |
2 | 400 | 2001 | Only UDP transport type is allowed for SNMP/NFS protocol type |
3 | 400 | 2002 | SSL can be enabled only for HTTP protocol type |
4 | 400 | 2003 | Port number can be between 1 and 65535 |
5 | 400 | 2004 | Non-standard port number cannot be same as the standard port number |
6 | 400 | 2005 | Non-standard port setting with the given details already exists |