This URL updates a packet capture rule template.
Resource URL
PUT /domain/<domain_id>/packetcaptureruletemplate/<name>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain id | Number | Yes |
| Template name | String | Yes |
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Name of template | String | Yes |
| Visible to child or not | Boolean | yes |
| List of rules | Array | yes |
Details of object in rule:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Traffic | String | yes |
| Protocol | String | yes |
| IP version | String | yes |
| Fragments only | Boolean | yes |
| Source IP | String | no |
| Source mask | Number | no |
| Source port | Number | no |
| Destination IP | String | no |
| Destination mask | Number | no |
| Destination port | Number | no |
| VLAN id | Number | no |
| Protocol number | Number | no |
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 Update. 1 if successful | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/domain/101/packetcaptureruletemplate/test
Payload
{
"templateName": "test",
"visibleToCild": true,
"rule": [{
"traffic": "ALL",
"protocol": "TCP",
"ipVersion": "IPV_4",
"fragmentsOnly": false,
"sourceIP": "0.0.0.0",
"sourceMask": 0,
"sourcePort": 0,
"destinationIP": "0.0.0.0",
"destinationMask": 0,
"destinationPort": 0,
"vlanId": 0,
"protocolNumber": 0
}]
}
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 | 4703 | Invalid domain |
2 | 400 | 6202 | Packet capture duration should be between 1 and 9999 |
3 | 400 | 6203 | Packet capture size should be between 1 and <maxsize> |
4 | 400 | 6204 | SCP server IP, username, password, and capture size are mandatory |
5 | 400 | 6205 | SCP server username should not contain space and special characters other than {-,_,.} |
6 | 400 | 6210 | Protocol number should be between 1 and 65535 when PROTOCOL_NUMBER is selected as protocol while you have given --> <protocol_number> |
7 | 400 | 6213 | Invalid template name |