„GET /dns/zones/{domain}/export“ ändern

master
Thomas Brinkmann 3 years ago
parent b2628a5859
commit a9ae6169f9
  1. 99
      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
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '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
Loading…
Cancel
Save