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