This URL gets port configuration details for a specific port of a Sensor.
Resource URL
GET /sensor/<sensor_id>/port/<port_id>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Sensor Id | Number | Yes |
| Port Id | Number | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Port information | Object |
Details of PortInfo:
Field Name | Description | Data Type |
|---|---|---|
| Unique Id to identify port | Number |
| Describes port configurations | Object |
| Port operating mode | Object |
| Port response mode | Object |
Details of portSettings:
Field Name | Description | Data Type |
|---|---|---|
| Name of the port | String |
| Describes port type | String |
| Port configuration (Speed and Duplex) | Object |
| Port administrative status. Can be "Enabled" or "Disabled" | String |
| Port operational status, Can be "Up" or "Down" | String |
Details of configuration:
Field Name | Description | Data Type |
|---|---|---|
| Port speed | String |
| Full/Half duplex port | String |
Details of operatingMode:
Field Name | Description | Data Type |
|---|---|---|
| Port mode | String |
| Describes port peer | String |
| Peer port connected to - can be "Inside Network" / "Outside Network" / "n/a" (in case of SPAN port) | String |
Details of ResponseMode:
Field Name | Description | Data Type |
|---|---|---|
| Send response from port | String |
Example
Request
GET https://<NSM_IP>/sdkapi/sensor/1001/port/101
Response
{
"portInfo": {
"ResponseMode": {
"sendResponseFrom": "This Port"
},
"portId": 112,
"operatingMode": {
"connectedTo": "Inside Network",
"mode": "In-line Fail-close (Port Pair)",
"peerPort": "2B"
},
"portSettings": {
"portName": "2A",
"portType": "SFP Gigabit Ethernet (Gbps) Fiber",
"configuration": {
"duplex": "Full",
"speed": "1 Gbps Auto-Negotiate"
},
"administrativeStatus": "Disabled",
"operationalStatus": "Down"
}
}
}
Error Information
Following error codes are returned by this URL:
S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 404 | 1106 | Invalid Sensor |
2 | 404 | 1122 | Invalid port |