API-Dokumentation Webhosting für alle LWS besuchen

Automatische Verlängerung aktivieren oder deaktivieren

PUT https://api.lws.net/v1/hosting/{hosting}/autorenew

operationIdputHostingAutorenew

Aktiviert oder deaktiviert die automatische Verlängerung für ein Hosting. Dies betrifft sowohl das Hosting als auch die Domain (falls zutreffend).

Pfadparameter

hosting string erforderlich

Der Domainname, dessen Einstellungen für die automatische Verlängerung Sie ändern möchten

Beispiel: example.com

Anfrage-Body

  • enable boolean

    Automatische Verlängerung aktivieren (true) oder deaktivieren (false)

    Beispiel: true

    optional
Beispielanfrage
{
  "enable": true
}

Antworten

200

Einstellungen für die automatische Verlängerung erfolgreich geändert

{
  "code": 200,
  "info": "Your hosting's auto-renewal settings has been changed",
  "data": true
}
Felder der Antwort 3
  • code integer

    Beispiel: 200

  • info string

    Beispiel: Your hosting's auto-renewal settings has been changed

  • data boolean

    Neuer Status der automatischen Verlängerung. true = aktiviert, false = deaktiviert

    Beispiel: true

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
  • code integer

    Beispiel: 314

  • info string

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

400

Ungültige Eingabe

{
  "code": 400,
  "info": "No auto-renewal status provided. Example: true",
  "data": []
}
Felder der Antwort 3
  • code integer

    Beispiel: 400

  • info string

    Beispiel: No auto-renewal status provided. Example: true

  • data any[]
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.

500

Interner Serverfehler

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

    Beispiel: 500

  • info string

    Beispiel: Internal Server Error

  • data string

    Beispiel: Error message

502

Ungültiges Gateway

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

    Beispiel: 502

  • info string

    Beispiel: Invalid response from upstream server

  • data object
Codebeispiele und Testkonsole anzeigen
PUT /hosting/{hosting}/autorenew
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X PUT \  "https://api.lws.net/v1/hosting/example.com/autorenew" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS" \  -H "Content-Type: application/json" \  -d '{"enable":true}'
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/hosting/example.com/autorenew");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");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, '{"enable":true}');$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.put(    "https://api.lws.net/v1/hosting/example.com/autorenew",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },    json={"enable": True},)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/hosting/example.com/autorenew", {  method: "PUT",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,    "Content-Type": "application/json",  },  body: JSON.stringify({"enable":true}),});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"body := strings.NewReader(`{"enable":true}`)req, _ := http.NewRequest("PUT",    "https://api.lws.net/v1/hosting/example.com/autorenew", 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)