From a9ae6169f9fcf344a39b87bc56787b810fef5887 Mon Sep 17 00:00:00 2001 From: Thomas Brinkmann Date: Thu, 2 Jun 2022 15:22:22 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EGET=20/dns/zones/{domain}/export?= =?UTF-8?q?=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GET-%2Fdns%2Fzones%2F%7Bdomain%7D%2Fexport.md | 99 +++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 GET-%2Fdns%2Fzones%2F%7Bdomain%7D%2Fexport.md 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 +