parent
9e1dfa2506
commit
cf5b1c744a
1 changed files with 109 additions and 0 deletions
@ -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 |
||||
<?php |
||||
|
||||
$curl = curl_init(); |
||||
|
||||
curl_setopt_array($curl, array( |
||||
CURLOPT_URL => '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 |
Loading…
Reference in new issue