API-Dokumentation

SSH-Key hinzufügen

SSH-Public-Key zu authorized_keys hinzufügen. Unterstützt ssh-ed25519, ssh-rsa und ecdsa-*.

Erforderlicher Scope: webspace:manage

Header

Header Erforderlich Wert
Authorization Ja Bearer DEIN_API_SCHLÜSSEL
Content-Type Ja application/json

Body

Parameter Erforderlich Beschreibung
publicKey Ja Vollständige Public-Key-Zeile (ssh-ed25519 AAA…).
comment Nein Optionales Label (Standard: Kommentar aus dem Key).

Antwort

{
  "data": {
    "id": "sha256-hQ0YFLi6TKgF...",
    "type": "ssh-ed25519",
    "publicKey": "ssh-ed25519 AAAA...",
    "comment": "my-laptop"
  }
}

Fehler

Status Code Beschreibung
400 MISSING_PUBLIC_KEY publicKey fehlt.
400 INVALID_PUBLIC_KEY Public-Key konnte nicht verarbeitet werden.

Beispiel

curl -X POST https://hosting.site.quest/api/v1/webspaces/69e80ac1.../ssh-keys \
  -H "Authorization: Bearer sq_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "publicKey": "ssh-ed25519 AAAA... my-laptop", "comment": "my-laptop" }'

MCP

Diese Aktion ist auch über das webspace_add_ssh_key MCP-Tool verfügbar.