„PUT /dns/zones/{domain}/dnssec“ ändern

master
Thomas Brinkmann 3 years ago
parent 2ee7b668f0
commit c1e9ad0ed6
  1. 85
      PUT-%2Fdns%2Fzones%2F%7Bdomain%7D%2Fdnssec.md

@ -0,0 +1,85 @@
## **PUT /dns/zones/{domain}/dnssec**
## **Inhalt**
---
- Parameter
- Optionale Parameter
- Beispiel Anfrage
- Beispiel Antwort
- Mögliche Fehlermeldungen
---
### Parameter
|URL Parameter | Typ | Beschreibung|
|----------|-----|-------------|
|domain | string | Die Domain dessen Records verändert werden sollen
|Body Parameter | Typ | Beschreibung|
|----------|-----|-------------|
| dnssec | boolean | True wenn DNSSEC Aktiviert werden soll |
---
### 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/dnssec',
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"dnssec": true
}',
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 PUT 'control.local/api/v2/dns/zones/domain1.de/dnssec' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"dnssec": true
}'
```
---
### Beispiel Antwort
```json
{
"status": "OK"
}
```
### Mögliche Fehlermeldungen
> :warning: Status Code **400** - Formatting Error
> :warning: Status Code **403** - Permission denied
Loading…
Cancel
Save