From cf5b1c744a4e57b9ecb8b88260e0f4c6f03d29ac Mon Sep 17 00:00:00 2001 From: Thomas Brinkmann Date: Thu, 2 Jun 2022 15:16:41 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EGET=20/dns/zones/{domain}=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GET-%2Fdns%2Fzones%2F%7Bdomain%7D.md | 109 +++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 GET-%2Fdns%2Fzones%2F%7Bdomain%7D.md diff --git a/GET-%2Fdns%2Fzones%2F%7Bdomain%7D.md b/GET-%2Fdns%2Fzones%2F%7Bdomain%7D.md new file mode 100644 index 0000000..5516dcb --- /dev/null +++ b/GET-%2Fdns%2Fzones%2F%7Bdomain%7D.md @@ -0,0 +1,109 @@ +## **GET /dns/zones/{domain}** + + +## **Inhalt** +--- +- Parameter +- Optionale Parameter +- Beispiel Anfrage +- Beispiel Antwort +- Mögliche Fehlermeldungen +--- + +### Parameter + +|URL Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|domain | string | Die Domain die abgerufen werden soll + +|Body Parameter | Typ | Beschreibung| +|----------|-----|-------------| +| - | - | - | + + +--- + +### Optionale Parameter + +|Query-String Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|- | - | - + + +--- + +### Beispiel Anfrage + +##### PHP +```php + 'control.local/api/v2/dns/zones/domain1.de', + 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' \ +--header 'X-TOKEN: test-token' \ +--header 'Content-Type: application/json' +``` + +--- + +### Beispiel Antwort + +```json +{ + "status": "OK", + "domain": { + "dnssec": false, + "name": "domain1.de.", + "rrsets": [ + { + "comments": [], + "name": "test.domain1.de.", + "records": [ + { + "content": "x.x.x.x", + "disabled": false + } + ], + "ttl": 3600, + "type": "A" + }, + { + "comments": [], + "name": "test2.domain1.de.", + "records": [ + { + "content": "y.y.y.y", + "disabled": false + } + ], + "ttl": 3600, + "type": "A" + } + ] + } +} +``` + +### Mögliche Fehlermeldungen + +> :warning: Status Code **403** - Permission denied + +> :warning: Status Code **400** - Formatting Error \ No newline at end of file