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
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.dsh.gg/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
curl --location --request GET 'https://api.dsh.gg/api/v2/dns/zones/domain1.de' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json'
Beispiel Antwort
{
"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
⚠️ Status Code 400 - Formatting Error
⚠️ Status Code 403 - Permission denied
⚠️ Status Code 404 - Domain {domain} not found in your list