Retrieval and modification of the pre-capture filters.
/api/v1/capture/prefilter/get
Returns a JSON object containing the configurations of all pre-capture filters.
Address
/api/v1/capture/prefilter/get
Verb
GET
Arguments
This endpoint has no parameters.
Example
curl -u fmadio:xxx -s 'https://192.168.108.10/api/v1/capture/prefilter/get' | jq
{
"Status": true,
"Str": "[Thu Feb 5 07:46:46 2023] successfully fetched prefilter config",
"Policy": "ACCEPT",
"Slice": "64",
"Config": {
"prefilter0": {
"enable": true,
"action": "drop",
"value": "all==true",
"comment": ""
},
"prefilter1": {
"enable": false,
"action": "drop",
"value": "",
"comment": ""
},
# omitted for brevity...
"prefilter15": {
"enable": false,
"action": "drop",
"value": "",
"comment": ""
}
}
}/api/v1/capture/prefilter/set
All-purpose configuration of a prefilter.
Address
/api/v1/capture/prefilter/set
Verb
GET
Arguments
Parameter | Description |
|---|---|
| Dictates what is done to the packet if it meets the condition set by the filter. Must be one of the following:
|
| Which filter to alter. Can be either of the following:
|
| Whether the filter should be active or inactive. Must be any of the following:
|
| The prefilter expression to use. |
Example
curl -u fmadio:xxx -Gs --data-urlencode 'FilterID=1' --data-urlencode 'Enable=true' --data-urlencode 'Value=all==true' --data-urlencode 'Action=drop' 'https://192.168.108.10/v1/capture/prefilter/set' | jq
{
"Status": true,
"Str": "[Fri Feb 6 15:26:57 2023] successfully updated"
}/api/v1/capture/prefilter/policy
Configures the default pre-filter policy (i.e. what happens to a packet that passes the filter’s expression).
Address
/api/v1/capture/prefilter/policy
Verb
GET
Arguments
Parameter | Description |
|---|---|
| Must be one of the following:
|
Example
curl -u fmadio:xxx -Gs --data-urlencode 'Policy=accept' 'https://192.168.108.10/api/v1/capture/prefilter/policy' | jq
{
"Status": true,
"Str": "[Fri Feb 6 15:37:28 2023] successfully updated Policy to ACCEPT"
}/api/v1/capture/prefilter/slice
Configure how many bytes will be kept from the start of a packet if it passes a filter whose action is set to slice.
Address
/api/v1/capture/prefilter/slice
Verb
GET
Arguments
Parameter | Description |
|---|---|
| The number of bytes kept from the start of a packet if it passes a filter whose action is set to |
Example
curl -u fmadio:xxx -Gs --data-urlencode 'Slice=128' 'https://192.168.108.10/api/v1/capture/prefilter/slice' | jq
{
"Status": true,
"Str": "[Fri Feb 6 15:35:00 2023] successfully updated slice to 128 Bytes"
}