API-Dokumentation Webhosting für alle LWS besuchen

Hostinginformationen abrufen

GET https://api.lws.net/v1/hosting/{hosting}

operationIdgetHosting

Ruft detaillierte Informationen zum angegebenen Hosting ab. Es muss vom Benutzer verwaltet werden.

Pfadparameter

hosting string erforderlich

Der Domainname, dessen Hostinginformationen Sie abrufen möchten

Beispiel: example.com

Antworten

200

Hostinginformationen erfolgreich abgerufen

{
  "code": 200,
  "info": "Retrieved hosting info",
  "data": {
    "domain": "example.com",
    "date_purchase": "2023-01-01",
    "date_expiration": "2024-01-01",
    "ns1": "ns1.lwsdns.com",
    "ns2": "ns2.lwsdns.com",
    "ns3": "ns3.lwsdns.com",
    "ns4": "ns4.lwsdns.com",
    "owner": 547645,
    "package": "LWS Perso",
    "lws_domain": true,
    "autorenew": {
      "payment": "aucun",
      "account": ""
    }
  }
}
Felder der Antwort 16
  • code integer

    Beispiel: 200

  • info string

    Beispiel: Retrieved hosting info

  • data object
  • domain any

    Name der Domain

    Beispiel: example.com

  • date_purchase any

    Kaufdatum des Hostings

    Beispiel: 2023-01-01

  • date_expiration any

    Ablaufdatum des Hostings

    Beispiel: 2024-01-01

  • ns1 any

    Erster Nameserver

    Beispiel: ns1.lwsdns.com

  • ns2 any

    Zweiter Nameserver

    Beispiel: ns2.lwsdns.com

  • ns3 any

    Dritter Nameserver

    Beispiel: ns3.lwsdns.com

  • ns4 any

    Vierter Nameserver

    Beispiel: ns4.lwsdns.com

  • owner any

    Inhaber des Hostings

    Beispiel: 547645

  • package any

    Art des Hostingpakets

    Beispiel: LWS Perso

  • lws_domain any

    Gibt an, ob die Domain bei LWS.fr gekauft wurde oder nicht

    Beispiel: true

  • autorenew object

    Informationen zur automatischen Verlängerung der Domain

  • payment string

    Beispiel: aucun

  • account string

    Beispiel:

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 hosting provided",
  "data": []
}
Felder der Antwort 3
  • code integer

    Beispiel: 400

  • info string

    Beispiel: No hosting provided

  • 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
GET /hosting/{hosting}
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X GET \  "https://api.lws.net/v1/hosting/example.com" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS"
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/hosting/example.com");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.get(    "https://api.lws.net/v1/hosting/example.com",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/hosting/example.com", {  method: "GET",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,  },});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"req, _ := http.NewRequest("GET",    "https://api.lws.net/v1/hosting/example.com", nil)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)resp, err := http.DefaultClient.Do(req)