3 PUT /dns/reverse/{ipaddress}/record
Thomas Brinkmann edited this page 2 years ago

PUT /dns/reverse/{ipaddress}/record

Inhalt


  • Parameter
  • Optionale Parameter
  • Beispiel Anfrage
  • Beispiel Antwort
  • Mögliche Fehlermeldungen

Parameter

URL Parameter Typ Beschreibung
ipaddress string Die IP-Adresse der man einen rDNS Record hinzufügen möchte
Body Parameter Typ Beschreibung
record string Der Record der für die IP-Adresse gesetzt werden soll

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/reverse/x.x.x.x/record',
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
    "record": "mail.domain1.de"
  }',
  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/reverse/x.x.x.x/record' \
--header 'X-TOKEN: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "record": "mail.domain1.de"
}'

Beispiel Antwort

{
    "status": "OK"
}

Mögliche Fehlermeldungen

Status Code 400 - Seems the ip address you've entered are not owened by you

Status Code 403 - Permission denied