This URL assigns the specified attack filters to a particular Sensor and an attack.
Resource URL
POST /sensor/<sensor_id>/attackfilter
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Sensor id | Number | Yes |
Payload Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| List of attack filters | Array | Yes |
Details of object in AssignAttackFilterRequest:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Attack id | String | Yes |
| Attack direction, can be "INBOUND" / "OUTBOUND" / "BOTH" / "UNKNOWN" | String | Yes |
| Overwrite filter | Boolean | Yes |
| List of attack filter Ids | Array | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Assignment status | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/sensor/1001/attackfilter
Payload:
{
"AssignAttackFilterRequest": [
{
"Direction": " INBOUND ",
"AttackId": "0x40503900",
"FilterId": [
419,
420
],
"Overwrite": true
},
{
"Direction": " INBOUND ",
"AttackId": "0x48304e00",
"FilterId": [
419
],
"Overwrite": true
}
]
}
Response
{
"status":1
}
Error Information
Following error codes are returned by this URL:
S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 404 | 1105 | Invalid domain |
2 | 404 | 1106 | Invalid Sensor |
3 | 404 | 1402 | Invalid attack id |
4 | 404 | 1403 | Invalid attack direction |