API documentation Web hosting accessible to everyone Visit LWS

List available operating systems

GET /api/v1/catalog/os-templates

operationIdgetOsTemplates

Required level
Read only
Rate limit
read, 3,600 calls per hour

Operating system templates available for a reinstallation: category: ssh (bare systems) and category: app (preinstalled application). The list is not paginated.

The os / variant pair is exactly what POST /servers/{vmid}/rebuild expects. min_memory_gb is in gigabytes (0: no minimum) and lets you check that a VPS is eligible before reinstalling it.

Responses

200

Catalog

{
  "data": [
    {
      "os": "almalinux-10",
      "variant": "default",
      "distribution": "almalinux",
      "version": "10",
      "commercial_name": "AlmaLinux 10",
      "category": "ssh",
      "min_memory_gb": 0,
      "managed": false
    },
    {
      "os": "debian-12",
      "variant": "forgejo",
      "distribution": "debian",
      "version": "12",
      "commercial_name": "Forgejo",
      "category": "app",
      "min_memory_gb": 2,
      "managed": false
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 41,
    "total": 41,
    "total_pages": 1
  }
}
Response fields 14
  • data object[]
    required
  • os string

    To pass to the reinstallation

    Example: debian-12

  • variant string

    To pass to the reinstallation

    Example: default

  • distribution string
  • version string
  • commercial_name string
  • category string

    ssh: bare system; app: preinstalled application

  • min_memory_gb integer (int64)

    Minimum memory, in GB; 0: no minimum

  • managed boolean

    Managed template

  • meta object

    Pagination. Non-paginated lists return everything and meta reflects the number returned.

    PaginationMeta

    required
  • page integer (int64)

    Page returned

    Example: 1

  • per_page integer (int64)

    Page size

    Example: 25

  • total integer (int64)

    Total number of items

    Example: 887

  • total_pages integer (int64)

    Total number of pages

    Example: 36

401

Authentication refused: invalid_token — Authorization header missing or malformed, or unknown key; access_disabled — API access turned off for this account, or API service temporarily turned off by LWS.

Authorization header missing or malformed, or unknown key

{
  "type": "https://docs.lws.fr/kvm/errors/invalid-token",
  "title": "Authentification invalide",
  "status": 401,
  "code": "invalid_token",
  "detail": "Clé inconnue ou révoquée.",
  "request_id": "3f9a1c07b2e45d18"
}

API access turned off for this account, or API service temporarily turned off by LWS

{
  "type": "https://docs.lws.fr/kvm/errors/access-disabled",
  "title": "Accès API désactivé",
  "status": 401,
  "code": "access_disabled",
  "detail": "L'accès API est désactivé pour ce compte. Réactivez-le depuis la page « API / MCP » du panel.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
403

Access denied: ip_not_allowed — calling address not authorized.

{
  "type": "https://docs.lws.fr/kvm/errors/ip-not-allowed",
  "title": "Adresse non autorisée",
  "status": 403,
  "code": "ip_not_allowed",
  "detail": "L'adresse 203.0.113.10 ne figure pas parmi les adresses autorisées de ce compte.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
429

Rate limit exceeded: rate_limited — hourly limit of the family exhausted.

{
  "type": "https://docs.lws.fr/kvm/errors/rate-limited",
  "title": "Quota dépassé",
  "status": 429,
  "code": "rate_limited",
  "detail": "Quota dépassé pour les opérations de type « read » : 3600 appels par heure. Réessayez dans 37 seconde(s).",
  "request_id": "3f9a1c07b2e45d18",
  "family": "read",
  "limit": 3600,
  "retry_after": 37
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
502

Dependency unreachable: upstream_unavailable — catalog temporarily unavailable.

{
  "type": "https://docs.lws.fr/kvm/errors/upstream-unavailable",
  "title": "Service momentanément indisponible",
  "status": 502,
  "code": "upstream_unavailable",
  "detail": "Le catalogue des systèmes n'a pas pu être obtenu. Réessayez dans quelques instants.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
Show the code examples and the test console
GET /catalog/os-templates
LWS_API_KEY='…'curl -X GET \  "https://panelkvm.lwspanel.com/api/v1/catalog/os-templates" \  -H "Authorization: Bearer $LWS_API_KEY"
$lwsApiKey = '…';$ch = curl_init("https://panelkvm.lwspanel.com/api/v1/catalog/os-templates");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "Authorization: Bearer " . $lwsApiKey,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_API_KEY = "…"res = requests.get(    "https://panelkvm.lwspanel.com/api/v1/catalog/os-templates",    headers={        "Authorization": "Bearer " + LWS_API_KEY,    },)print(res.json())
const LWS_API_KEY = "…";const res = await fetch("https://panelkvm.lwspanel.com/api/v1/catalog/os-templates", {  method: "GET",  headers: {    "Authorization": "Bearer " + LWS_API_KEY,  },});const data = await res.json();
lwsApiKey := "…"req, _ := http.NewRequest("GET",    "https://panelkvm.lwspanel.com/api/v1/catalog/os-templates", nil)req.Header.Set("Authorization", "Bearer "+lwsApiKey)resp, err := http.DefaultClient.Do(req)