diff --git a/GET-%2Fdns%2Fzones%2F%7Bdomain%7D%2Fexport.md b/GET-%2Fdns%2Fzones%2F%7Bdomain%7D%2Fexport.md new file mode 100644 index 0000000..4a69387 --- /dev/null +++ b/GET-%2Fdns%2Fzones%2F%7Bdomain%7D%2Fexport.md @@ -0,0 +1,99 @@ +## **GET /dns/zones/{domain}/export** + + +## **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/dns/zones/domain1.de/export', + 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/dns/zones/domain1.de/export' \ +--header 'X-TOKEN: test-token' \ +--header 'Content-Type: application/json' +``` + +--- + +### Beispiel Antwort + +```json +{ + "status": "OK", + "export": { + "csv": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "json": { + "domain": "domain1.de.", + "rrsets": [ + { + "name": "test.domain1.de.", + "type": "A", + "content": "x.x.x.x" + }, + { + "name": "test2.domain1.de.", + "type": "A", + "content": "y.y.y.y" + } + ] + }, + "xml": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } +} +``` + +### Mögliche Fehlermeldungen + +> :warning: Status Code **403** - Permission denied + +> :warning: Status Code **404** - Domain {domain} not found in your list +