API documentation Web hosting accessible to everyone Visit LWS

Get all requests or a specific pending request from the database

GET https://api.lws.net/v1/requests

operationIdgetDatabase

Get all requests or search for a specific pending request. Leave body empty to get all requests ; All parameters are optional, the more parameters, the more precise the search will be. Requests are kept for one year.

Query parameters

objet string optional

Which endpoint was used for the request

Example: domain

valeur string optional

Value associated with the request. Generally value specified as {domain} or {hosting}

Example: example.fr

type string optional

Subtype of the endpoint used

Example: dns

Responses

200

Domain information retrieved successfully

{
  "code": 200,
  "info": "Fetched request(s)",
  "data": [
    {
      "id_revendeur": 245721,
      "date": "2023-01-01",
      "objet": "domain",
      "valeur": "example.fr",
      "type": "dns",
      "retour": "0"
    }
  ]
}
Response fields 9
  • code integer

    Example: 200

  • info string

    Example: Fetched request(s)

  • data object[]
  • id_revendeur integer

    ID of the reseller who made the request

    Example: 245721

  • date string (date)

    When the request was created

    Example: 2023-01-01

  • objet string

    Which endpoint was used for the request

    Example: domain

  • valeur string

    Value associated with the request. Generally value specified as {domain} or {hosting}

    Example: example.fr

  • type string

    Subtype of the endpoint used

    Example: dns

  • retour string

    Status of the request. By default will be NULL, once the request has been processed it will change for an error code

    Example: 0

400

Failed to fetch requests

{
  "code": 400,
  "info": "Failed to fetch requests"
}
Response fields 2
  • code integer

    Example: 400

  • info string

    Example: Failed to fetch requests

401

Unauthorized - Missing authentication headers

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

    Example: 401

  • info string

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

404

No requests found

{
  "code": 404,
  "info": "No requests found"
}
Response fields 2
  • code integer

    Example: 404

  • info string

    Example: No requests found

429

Rate limit exceeded

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Response fields 2
  • code integer

    Example: 429

  • info string

    Example: Rate limit exceeded. Please try again later.

500

No database connection

{
  "code": 500,
  "info": "No database connection"
}
Response fields 2
  • code integer

    Example: 500

  • info string

    Example: No database connection

502

Invalid response from database

{
  "code": 502,
  "info": "Invalid response from database"
}
Response fields 2
  • code integer

    Example: 502

  • info string

    Example: Invalid response from database

Show the code examples and the test console
GET /requests
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X GET \  "https://api.lws.net/v1/requests" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS"
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/requests");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/requests",    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/requests", {  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/requests", nil)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)resp, err := http.DefaultClient.Do(req)