parent
5ad899719a
commit
7121c1ad45
1 changed files with 133 additions and 0 deletions
@ -0,0 +1,133 @@ |
|||||||
|
## **GET /protection/flexrules/{uuid}** |
||||||
|
|
||||||
|
|
||||||
|
## **Inhalt** |
||||||
|
--- |
||||||
|
- Parameter |
||||||
|
- Optionale Parameter |
||||||
|
- Beispiel Anfrage |
||||||
|
- Beispiel Antwort |
||||||
|
- Mögliche Fehlermeldungen |
||||||
|
--- |
||||||
|
|
||||||
|
### Parameter |
||||||
|
|
||||||
|
|URL Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
|uuid | string | Die UUID der Flexrule |
||||||
|
|
||||||
|
|Body Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
| - | - | - | |
||||||
|
|
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Optionale Parameter |
||||||
|
|
||||||
|
|Query-String Parameter | Typ | Beschreibung| |
||||||
|
|----------|-----|-------------| |
||||||
|
|?metrics | integer | Anzahl der zurückzugebenden Übereinstimmungsmetriken (pps) (max. 500, Standard: keine) |
||||||
|
|?time_start | string | Unix-Zeitstempel der Metriken (pps) Zeitbereich Start |
||||||
|
|?time_end | string | Unix-Zeitstempel der Metriken (pps) Zeitbereich Ende |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Beispiel Anfrage |
||||||
|
|
||||||
|
##### PHP |
||||||
|
```php |
||||||
|
<?php |
||||||
|
|
||||||
|
$curl = curl_init(); |
||||||
|
|
||||||
|
curl_setopt_array($curl, array( |
||||||
|
CURLOPT_URL => 'control.local/api/v2/protection/flexrules/ABCDE-FGHI-1234-567-8910', |
||||||
|
CURLOPT_CUSTOMREQUEST => 'GET', |
||||||
|
CURLOPT_HTTPHEADER => array( |
||||||
|
'X-TOKEN: test-token', |
||||||
|
'Content-Type: application/json' |
||||||
|
), |
||||||
|
)); |
||||||
|
|
||||||
|
$response = curl_exec($curl); |
||||||
|
|
||||||
|
curl_close($curl); |
||||||
|
echo $response; |
||||||
|
``` |
||||||
|
|
||||||
|
##### cURL |
||||||
|
```bash |
||||||
|
curl --location --request GET 'control.local/api/v2/protection/flexrules/ABCDE-FGHI-1234-567-8910' \ |
||||||
|
--header 'X-TOKEN: test-token' \ |
||||||
|
--header 'Content-Type: application/json' |
||||||
|
``` |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
### Beispiel Antwort |
||||||
|
|
||||||
|
```json |
||||||
|
{ |
||||||
|
"status": "OK", |
||||||
|
"flexrule": |
||||||
|
{ |
||||||
|
"uuid": "ABCDE-FGHI-1234-567-8910", |
||||||
|
"seq": 1, |
||||||
|
"from": { |
||||||
|
"ip": { |
||||||
|
"src": { |
||||||
|
"start": "X.X.X.X", |
||||||
|
"end": "X.X.X.X" |
||||||
|
}, |
||||||
|
"dst": "192.168.1.2/32", |
||||||
|
"protocol": 6 |
||||||
|
}, |
||||||
|
"port": { |
||||||
|
"src": { |
||||||
|
"start": 0, |
||||||
|
"end": 0 |
||||||
|
}, |
||||||
|
"dst": { |
||||||
|
"start": 0, |
||||||
|
"end": 0 |
||||||
|
} |
||||||
|
}, |
||||||
|
"length": { |
||||||
|
"start": 0, |
||||||
|
"end": 0 |
||||||
|
}, |
||||||
|
"payload": "", |
||||||
|
"geo": { |
||||||
|
"asn": 0, |
||||||
|
"country": 0 |
||||||
|
}, |
||||||
|
"tcp": { |
||||||
|
"flags": false, |
||||||
|
"syn": false, |
||||||
|
"ack": false, |
||||||
|
"psh": false, |
||||||
|
"fin": false, |
||||||
|
"urg": false, |
||||||
|
"rst": false |
||||||
|
} |
||||||
|
}, |
||||||
|
"then": { |
||||||
|
"ratelimit": 0, |
||||||
|
"seqjump": 0, |
||||||
|
"action": 1, |
||||||
|
"gqc": { |
||||||
|
"type": 0, |
||||||
|
"ratelimit": 0, |
||||||
|
"passthrough": false |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
### Mögliche Fehlermeldungen |
||||||
|
|
||||||
|
> :warning: Status Code **403** - Permission denied |
||||||
|
|
||||||
|
> :warning: Status Code **404** - Flexrule not found |
Loading…
Reference in new issue