API-Dokumentation Webhosting für alle LWS besuchen

Einen Eintrag aus der DNS-Zone löschen

DELETE https://api.lws.net/v1/domain/{domain}/zdns

operationIddeleteDomainZdns

Löscht einen bestimmten DNS-Eintrag aus der DNS-Zone der Domain

Pfadparameter

domain string erforderlich

Domainname, für den der DNS-Eintrag gelöscht werden soll

Anfrage-Body

  • id integer

    ID des zu löschenden DNS-Eintrags (über GET /domain/{domain}/zdns ermittelbar)

    Beispiel: 234851

    erforderlich
Beispielanfrage
{
  "id": 234851
}

Antworten

200

DNS-Eintrag erfolgreich gelöscht

{
  "code": 200,
  "info": "Success: Removed record in the DNS Zone",
  "data": 234851
}
Felder der Antwort 3 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 200

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: Success: Removed record in the DNS Zone

  • data integer

    ID des gelöschten Eintrags

    Beispiel: 234851

201

DNS-Eintrag bereits gelöscht / nicht gefunden

{
  "code": 201,
  "info": "The record 234851 does not exist or has already been deleted",
  "data": 234851
}
Felder der Antwort 3 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 201

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: The record 234851 does not exist or has already been deleted

  • data integer

    Beispiel: 234851

314

Domain im Konto nicht gefunden

314 ist kein registrierter HTTP-Statuscode. Er ist spezifisch für diese API.

{
  "code": 314,
  "info": "Provided domain has not been found on your account. You must own this domain to manage it."
}
Felder der Antwort 2 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 314

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: Provided domain has not been found on your account. You must own this domain to manage it.

400

Ungültige Anfrage - ungültige Eingabe

{
  "code": 400,
  "info": "Invalid input: No ID provided. Example: 234851"
}
Felder der Antwort 2 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 400

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: Invalid input: No ID provided. Example: 234851

404

DNS-Eintrag nicht gefunden

{
  "code": 404,
  "info": "Could not remove record from the DNS Zone",
  "data": 234851
}
Felder der Antwort 3 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 404

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: Could not remove record from the DNS Zone

  • data integer

    Beispiel: 234851

500

Interner Serverfehler

{
  "code": 500,
  "info": "Internal Server Error",
  "data": "string"
}
Felder der Antwort 3 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 500

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: Internal Server Error

  • data string

    Fehlermeldung

502

Ungültiges Gateway

{
  "code": 502,
  "info": "Invalid response from upstream server",
  "data": []
}
Felder der Antwort 3 Erweitert ApiEnvelope
  • code integer

    Statuscode/Fehlercode auf Anwendungsebene (nicht immer identisch mit dem HTTP-Statuscode)

    Beispiel: 502

  • info string

    Lesbare Nachricht, die das Ergebnis der Anfrage beschreibt

    Beispiel: Invalid response from upstream server

  • data object

    Ungültige Antwort des Servers

401

Nicht autorisiert - Authentifizierungs-Header fehlen

{
  "code": 401,
  "info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Felder der Antwort 2
  • code integer

    Beispiel: 401

  • info string

    Beispiel: Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed.

429

Anfragelimit überschritten

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Felder der Antwort 2
  • code integer

    Beispiel: 429

  • info string

    Beispiel: Rate limit exceeded. Please try again later.

Codebeispiele und Testkonsole anzeigen
DELETE /domain/{domain}/zdns
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X DELETE \  "https://api.lws.net/v1/domain/{domain}/zdns" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS" \  -H "Content-Type: application/json" \  -d '{"id":234851}'
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/domain/{domain}/zdns");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,    "Content-Type: application/json",]);curl_setopt($ch, CURLOPT_POSTFIELDS, '{"id":234851}');$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.delete(    "https://api.lws.net/v1/domain/{domain}/zdns",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },    json={"id": 234851},)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/domain/{domain}/zdns", {  method: "DELETE",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,    "Content-Type": "application/json",  },  body: JSON.stringify({"id":234851}),});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"body := strings.NewReader(`{"id":234851}`)req, _ := http.NewRequest("DELETE",    "https://api.lws.net/v1/domain/{domain}/zdns", body)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)req.Header.Set("Content-Type", "application/json")resp, err := http.DefaultClient.Do(req)