Documentazione API L'alojamento web accessibile a tutti Visitate LWS

Attivare o disattivare la modalità rescue

Differito Asincrono · 202

PUT /api/v1/servers/{vmid}/rescue

operationIdputServerRescue

Livello richiesto
Completo
Quota
modifica, 300 chiamate all'ora

Avvia il VPS su un'immagine di ripristino, oppure lo fa uscire da essa. In modalità rescue il sistema abituale non viene avviato: i servizi ospitati restano non disponibili fino all'uscita dalla modalità.

reboot: true riavvia immediatamente perché il passaggio abbia effetto, con un arresto forzato seguito da un avvio (senza arresto corretto del sistema, come stop); altrimenti si applica al prossimo avvio. L'ordine di avvio non è configurabile: viene deciso lato server.

A ogni passaggio, l'immagine rescue viene montata e poi verificata: se non compare nell'unità, il passaggio viene annullato e la chiamata risponde 409.

Il task creato riporta l'azione server.enable_rescue, server.reboot_rescue (attivazione con riavvio) o server.disable_rescue.

Questa richiesta viene elaborata in background: risponde immediatamente mentre il lavoro continua. Seguila con gli endpoint di task o request.

Parametri del percorso

vmid string obbligatorio

Identificativo del VPS. Deve appartenere all'account e rientrare nell'ambito della chiave.

motivo ^\d+$ Esempio: 116807

Corpo della richiesta

  • enabled boolean

    true: passare in modalità rescue; false: uscirne

    obbligatorio
  • reboot boolean

    Riavviare immediatamente; un valore non booleano viene rifiutato

    facoltativo
Esempio di richiesta
{
  "enabled": true,
  "reboot": true
}

Risposte

202

Richiesta accettata e messa in coda. Segua il task restituito con GET /tasks/{id}.

La richiesta è stata accettata, non completata. La risposta contiene un task da seguire.

{
  "data": {
    "tasks": [
      {
        "id": "tsk_000002e1",
        "status": "pending",
        "action": "server.reboot_rescue",
        "vmid": "116807",
        "description": "Demande de passage en mode Rescue avec reboot du serveur VPS-116807",
        "created_at": "2026-08-20T14:31:02+02:00",
        "finished_at": null
      }
    ]
  }
}
Campi della risposta 9
  • data object
  • tasks object[]

    Task creati; sempre un array

  • id string

    Identificativo opaco

    Esempio: tsk_000002e1

  • status string

    unknown segnalerebbe uno stato che l'API non sa denominare

    uno di: pending, succeeded, failed, unknown

  • action string

    Tipo di task

    uno di: server.start, server.stop, server.shutdown, server.reboot, server.reset, server.rebuild, server.enable_rescue, server.disable_rescue, server.reboot_rescue, snapshot.create, snapshot.delete, snapshot.rollback, backup.create, backup.restore, iso.mount, iso.unmount, firewall.sync, firewall.unblock_port_25 TaskAction

  • vmid string
  • description string
  • created_at string (date-time)
  • finished_at string (date-time)

    null finché il task è in esecuzione

400

Parametri non validi: validation_failed — enabled assente o non booleano, oppure reboot presente e non booleano.

{
  "type": "https://docs.lws.fr/kvm/errors/validation-failed",
  "title": "Paramètres invalides",
  "status": 400,
  "code": "validation_failed",
  "detail": "Paramètre « enabled » invalide.",
  "request_id": "3f9a1c07b2e45d18",
  "errors": {
    "enabled": "Booléen attendu : true pour passer en mode secours, false pour en sortir."
  }
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Autenticazione rifiutata: invalid_token — intestazione Authorization assente o non valida, oppure chiave sconosciuta; access_disabled — accesso API disattivato per questo account, oppure servizio API momentaneamente sospeso da LWS.

intestazione Authorization assente o non valida, oppure chiave sconosciuta

{
  "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"
}

accesso API disattivato per questo account, oppure servizio API momentaneamente sospeso da 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"
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Accesso negato: insufficient_scope — livello della chiave insufficiente; ip_not_allowed — indirizzo di chiamata non autorizzato.

livello della chiave insufficiente

{
  "type": "https://docs.lws.fr/kvm/errors/insufficient-scope",
  "title": "Droits insuffisants",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "Niveau de permission « full » requis.",
  "request_id": "3f9a1c07b2e45d18",
  "required_level": "full"
}

indirizzo di chiamata non autorizzato

{
  "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"
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Risorsa non trovata: vm_not_found — VPS inesistente o fuori dall'ambito della chiave.

{
  "type": "https://docs.lws.fr/kvm/errors/vm-not-found",
  "title": "VPS introuvable",
  "status": 404,
  "code": "vm_not_found",
  "detail": "Aucun VPS 999999 sur ce compte.",
  "request_id": "3f9a1c07b2e45d18"
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Conflitto con lo stato attuale: invalid_state — immagine rescue non montata, passaggio annullato; task_already_running — un passaggio della modalità rescue è già in corso; service_suspended — VPS disattivato o scaduto: sono possibili solo le letture; server_locked — VPS bloccato dall'hypervisor, vedere reason; con operation_in_progress, Retry-After indica l'attesa consigliata.

immagine rescue non montata, passaggio annullato

{
  "type": "https://docs.lws.fr/kvm/errors/invalid-state",
  "title": "Opération impossible en l'état",
  "status": 409,
  "code": "invalid_state",
  "detail": "L'image de secours n'a pas pu être montée sur ce VPS. La bascule est annulée.",
  "request_id": "3f9a1c07b2e45d18"
}

un passaggio della modalità rescue è già in corso

{
  "type": "https://docs.lws.fr/kvm/errors/task-already-running",
  "title": "Opération déjà en cours",
  "status": 409,
  "code": "task_already_running",
  "detail": "Une bascule du mode secours est déjà en cours sur ce VPS. Attendez qu'elle aboutisse.",
  "request_id": "3f9a1c07b2e45d18",
  "task_id": "tsk_000002d5"
}

VPS disattivato o scaduto: sono possibili solo le letture

{
  "type": "https://docs.lws.fr/kvm/errors/service-suspended",
  "title": "Service suspendu",
  "status": 409,
  "code": "service_suspended",
  "detail": "Le VPS 116807 est expiré.",
  "request_id": "3f9a1c07b2e45d18"
}

VPS bloccato dall'hypervisor, vedere reason; con operation_in_progress, Retry-After indica l'attesa consigliata

{
  "type": "https://docs.lws.fr/kvm/errors/server-locked",
  "title": "Serveur verrouillé",
  "status": 409,
  "code": "server_locked",
  "detail": "Action impossible pour le moment : une sauvegarde est en cours sur le serveur. Réessayez dans quelques minutes.",
  "request_id": "3f9a1c07b2e45d18",
  "lock": "snapshot",
  "reason": "operation_in_progress"
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Quota superata: rate_limited — quota oraria della famiglia esaurita.

{
  "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 « mutation » : 300 appels par heure. Réessayez dans 95 seconde(s).",
  "request_id": "3f9a1c07b2e45d18",
  "family": "mutation",
  "limit": 300,
  "retry_after": 95
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Dipendenza irraggiungibile: hypervisor_unreachable; upstream_unavailable — inventario dei VPS momentaneamente non disponibile.

Hypervisor irraggiungibile

{
  "type": "https://docs.lws.fr/kvm/errors/hypervisor-unreachable",
  "title": "Hyperviseur injoignable",
  "status": 502,
  "code": "hypervisor_unreachable",
  "detail": "L'hyperviseur hébergeant ce VPS n'a pas répondu. Réessayez dans quelques instants.",
  "request_id": "3f9a1c07b2e45d18"
}

inventario dei VPS momentaneamente non disponibile

{
  "type": "https://docs.lws.fr/kvm/errors/upstream-unavailable",
  "title": "Service momentanément indisponible",
  "status": 502,
  "code": "upstream_unavailable",
  "detail": "Inventaire des VM indisponible.",
  "request_id": "3f9a1c07b2e45d18"
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

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

Server host in intervento: server_maintenance — server host in intervento annunciato da LWS e irraggiungibile; rispetti Retry-After.

{
  "type": "https://docs.lws.fr/kvm/errors/server-maintenance",
  "title": "Intervention en cours sur le serveur hôte",
  "status": 503,
  "code": "server_maintenance",
  "detail": "Le serveur hébergeant ce VPS fait l'objet d'une intervention programmée par LWS : il est momentanément inaccessible. Fin prévue : 2026-10-21T18:00:00+02:00.",
  "request_id": "3f9a1c07b2e45d18",
  "maintenance": {
    "kind": "works",
    "started_at": "2026-10-21T14:00:00+02:00",
    "expected_end": "2026-10-21T18:00:00+02:00"
  }
}
Campi della risposta 18
  • type string (uri)

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

    obbligatorio
  • title string

    Titolo breve

    Esempio: VPS introuvable

    obbligatorio
  • status integer (int64)

    Stato HTTP

    Esempio: 404

    obbligatorio
  • code string

    Codice macchina stabile (vedere «Errori» in Per iniziare)

    Esempio: vm_not_found

    obbligatorio
  • detail string

    Messaggio dettagliato

    Esempio: Aucun VPS 999999 sur ce compte.

    obbligatorio
  • request_id string

    Identificativo della richiesta, da comunicare al supporto

    Esempio: 3f9a1c07b2e45d18

    obbligatorio
  • errors object

    validation_failed: messaggio per ogni parametro errato

  • required_level string

    insufficient_scope: livello richiesto dall'operazione

    uno di: read, exploitation, full

  • task_id string

    task_already_running: task in corso su questo VPS

    Esempio: tsk_000002d5

  • family string

    rate_limited: famiglia di quota esaurita

    uno di: read, mutation, heavy

  • limit integer (int64)

    rate_limited: limite orario della famiglia

  • retry_after integer (int64)

    rate_limited: secondi da attendere

  • lock string

    server_locked: blocco impostato dall'hypervisor (backup, snapshot, suspended…)

    Esempio: snapshot

  • reason string

    server_locked: operation_in_progress, è in corso un'operazione, riprovi dopo Retry-After; suspended, il VPS è in ibernazione, lo avvii prima; support_notified, blocco anomalo, il team LWS è stato avvisato e sta intervenendo

    uno di: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: natura dell'intervento, inizio e fine prevista (null per un incidente)

  • kind string

    uno di: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
Mostra gli esempi di codice e la console di test
PUT /servers/{vmid}/rescue
LWS_API_KEY='…'curl -X PUT \  "https://panelkvm.lwspanel.com/api/v1/servers/116807/rescue" \  -H "Authorization: Bearer $LWS_API_KEY" \  -H "Content-Type: application/json" \  -d '{"enabled":true,"reboot":true}'
$lwsApiKey = '…';$ch = curl_init("https://panelkvm.lwspanel.com/api/v1/servers/116807/rescue");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "Authorization: Bearer " . $lwsApiKey,    "Content-Type: application/json",]);curl_setopt($ch, CURLOPT_POSTFIELDS, '{"enabled":true,"reboot":true}');$res = json_decode(curl_exec($ch), true);
import requestsLWS_API_KEY = "…"res = requests.put(    "https://panelkvm.lwspanel.com/api/v1/servers/116807/rescue",    headers={        "Authorization": "Bearer " + LWS_API_KEY,    },    json={"enabled": True, "reboot": True},)print(res.json())
const LWS_API_KEY = "…";const res = await fetch("https://panelkvm.lwspanel.com/api/v1/servers/116807/rescue", {  method: "PUT",  headers: {    "Authorization": "Bearer " + LWS_API_KEY,    "Content-Type": "application/json",  },  body: JSON.stringify({"enabled":true,"reboot":true}),});const data = await res.json();
lwsApiKey := "…"body := strings.NewReader(`{"enabled":true,"reboot":true}`)req, _ := http.NewRequest("PUT",    "https://panelkvm.lwspanel.com/api/v1/servers/116807/rescue", body)req.Header.Set("Authorization", "Bearer "+lwsApiKey)req.Header.Set("Content-Type", "application/json")resp, err := http.DefaultClient.Do(req)