PUT /dns/zones/{domain}/records
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 |
---|---|---|
- | - | - |
Optionale Parameter
Query-String Parameter | Typ | Beschreibung |
---|---|---|
- | - | - |
Beispiel Anfrage
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.dsh.gg/api/v2/dns/zones/domain1.de/records',
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "test22.domain1.de.",
"type": "A",
"ttl": 3600,
"records": [
{
"content": "x.x.x.x"
}
]
}',
CURLOPT_HTTPHEADER => array(
'X-TOKEN: test-token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
cURL
curl --location --request PUT 'https://api.dsh.gg/api/v2/dns/zones/domain1.de/records' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "test22.domain1.de.",
"type": "A",
"ttl": 3600,
"records": [
{
"content": "x.x.x.x"
}
]
}'
Beispiel Antwort
{
"status": "OK"
}
Mögliche Fehlermeldungen
⚠️ Status Code 400 - TTL must be between 3600 (1 Hour) and 86400 (24 Hours)!
⚠️ Status Code 400 - Record 'content' variable is not present or not a string
⚠️ Status Code 400 - Comment 'content' variable is not present or not a string
⚠️ Status Code 400 - Comment 'account' variable is not present or not a string
⚠️ Status Code 400 - Formatting Error
⚠️ Status Code 403 - Permission denied