This URL retrieves the packet capture settings.
Resource URL
GET /sensor/<sensor_id>/packetcapture
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Sensor id | Number | Yes |
Payload Request Parameters: None
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Status of packet capture | String |
| Packet capture settings | Object |
| List of packet capture rule | Object |
Details of capTureSettings:
Field Name | Description | Data Type |
|---|---|---|
| Monitoring SPAN port details | Object |
| Manager settings | Object |
| SCP server settings | Object |
Details of rules:
Field Name | Description | Data Type |
|---|---|---|
| List of rules | ObjectList |
Details of monitoringSPANPort:
Field Name | Description | Data Type |
|---|---|---|
| Monitoring SPAN port | String |
| Duration details | Object |
Details of captureDuration:
Field Name | Description | Data Type |
|---|---|---|
| Capture duration | Number |
| Run until released | Boolean |
Details of Manager:
Field Name | Description | Data Type |
|---|---|---|
| Capture size | Number |
Details of scpServer:
Field Name | Description | Data Type |
|---|---|---|
| IP of SCP server | String |
| SCP user name | String |
| SCP server password | String |
| Capture size | Number |
Details of captureRule:
Field Name | Description | Data Type |
|---|---|---|
| Rule id | Number |
| Monitoring port | String |
| Traffic | String |
| Protocol | String |
| IP version | String |
| Fragments only | Boolean |
| Source IP | String |
| Source mask | Number |
| Source port | Number |
| Destination IP | String |
| Destination mask | Number |
| Destination port | Number |
| VLAN id | Number |
| Protocol number | Number |
Example
Request
GET https://<NSM_IP>/sdkapi/sensor/1001/packetcapture
Response
{
"status": "Not yet started",
"capTureSettings": {
"monitoringSPANPort": {
"port": "Capturing Disabled",
"captureDuration": {
"captureDurationInMinutes": 120,
"runTillExplicitlyReleased": false
}
},
"manager": null,
"scpServer": null
},
"rules": {
"captureRule":
[
{
"ruleId": 716,
"monitoringPort": "ALL",
"traffic": "ALL",
"protocol": "TCP",
"ipVersion": "IPV_6",
"fragmentsOnly": true,
"sourceIP": "0.0.0.0",
"sourceMask": 0,
"sourcePort": 0,
"destinationIP": "0.0.0.0",
"destinationMask": 0,
"destinationPort": 0,
"vlanId": 0,
"protocolNumber": 0
},
{
"ruleId": 717,
"monitoringPort": "ALL",
"traffic": "ARP",
"protocol": "TCP",
"ipVersion": "IPV_6",
"fragmentsOnly": true,
"sourceIP": "0.0.0.0",
"sourceMask": 0,
"sourcePort": 0,
"destinationIP": "0.0.0.0",
"destinationMask": 0,
"destinationPort": 0,
"vlanId": 0,
"protocolNumber": 0
} ]
}
}
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 | 500 | 1124 | The Sensor is inactive |
3 | 400 | 6201 | Packet capture not supported on this Sensor |