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 | 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 | Status of packet capture | String |
| capTureSettings | Packet capture settings | Object |
| rules | List of packet capture rule | Object |
Details of capTureSettings:
| Field Name | Description | Data Type |
|---|---|---|
| monitoringSPANPort | Monitoring SPAN port details | Object |
| manager | Manager settings | Object |
| scpServer | SCP server settings | Object |
Details of rules:
| Field Name | Description | Data Type |
|---|---|---|
| captureRule | List of rules | ObjectList |
Details of monitoringSPANPort:
| Field Name | Description | Data Type |
|---|---|---|
| port | Monitoring SPAN port | String |
| captureDuration | Duration details | Object |
Details of captureDuration:
| Field Name | Description | Data Type |
|---|---|---|
| captureDurationInMinutes | Capture duration | Number |
| runTillExplicitlyReleased | Run until released | Boolean |
Details of Manager:
| Field Name | Description | Data Type |
|---|---|---|
| captureSizeinMB | Capture size | Number |
Details of scpServer:
| Field Name | Description | Data Type |
|---|---|---|
| scpServerIP | IP of SCP server | String |
| scpServerUserName | SCP user name | String |
| scpServerPassword | SCP server password | String |
| captureSizeinMB | Capture size | Number |
Details of captureRule:
| Field Name | Description | Data Type |
|---|---|---|
| ruleId | Rule id | Number |
| monitoringPort | Monitoring port | String |
| traffic | Traffic | String |
| protocol | Protocol | String |
| ipVersion | IP version | String |
| fragmentsOnly | Fragments only | Boolean |
| sourceIP | Source IP | String |
| sourceMask | Source mask | Number |
| sourcePort | Source port | Number |
| destinationIP | Destination IP | String |
| destinationMask | Destination mask | Number |
| destinationPort | Destination port | Number |
| vlanId | VLAN id | Number |
| protocolNumber | 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 |