From 09ce62ee5208244ab86a1b7fee7ff4f35cd89640 Mon Sep 17 00:00:00 2001 From: Thomas Brinkmann Date: Wed, 1 Jun 2022 21:12:24 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EGET=20/protection/routing/{ipAddress}/?= =?UTF-8?q?{cidr}=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ion%2Frouting%2F%7BipAddress%7D%2F%7Bcidr%7D.md | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 GET-%2Fprotection%2Frouting%2F%7BipAddress%7D%2F%7Bcidr%7D.md diff --git a/GET-%2Fprotection%2Frouting%2F%7BipAddress%7D%2F%7Bcidr%7D.md b/GET-%2Fprotection%2Frouting%2F%7BipAddress%7D%2F%7Bcidr%7D.md new file mode 100644 index 0000000..4194e8b --- /dev/null +++ b/GET-%2Fprotection%2Frouting%2F%7BipAddress%7D%2F%7Bcidr%7D.md @@ -0,0 +1,96 @@ +## **GET /protection/routing/{ipAddress}/{cidr}** + + +## **Inhalt** +--- +- Parameter +- Optionale Parameter +- Beispiel Anfrage +- Beispiel Antwort +- Mögliche Fehlermeldungen +--- + +### Parameter + +|URL Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|- | -| - + +|Body Parameter | Typ | Beschreibung| +|----------|-----|-------------| +| - | - | - | + + +--- + +### Optionale Parameter + +|Query-String Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|- | - | - + + +--- + +### Beispiel Anfrage + +##### PHP +```php + 'control.local/api/v2/protection/routing/192.168.1.2/32', + 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/routing/192.168.1.2/32' \ +--header 'X-TOKEN: test-token' \ +--header 'Content-Type: application/json' +``` + +--- + +### Beispiel Antwort + +```json +{ + "status": "OK", + "result": [ + { + "blackhole": null, + "flowspec": null, + "l4_dynamic": null, + "l4_permanent": false, + "l7_only": false, + "l7_permanent": false, + "last_changed": { + "@timestamp": "2022-04-18T10:39:55+02:00", + "time": 1650271195 + }, + "prefix": "192.168.1.2/32" + } + ] +} +``` + +### Mögliche Fehlermeldungen + +> :warning: Status Code **204** - Routing has not changed yet for this ip + +> :warning: Status Code **403** - Permission denied + +> :warning: Status Code **404** - IP address not found