HexaHosting API – Dokumentation
Version 1 · Basis-URL https://api.hexahosting.de · Alle Antworten im JSON-Format.
Gameserver werden echt über unser Pterodactyl-Panel (https://panel.hexahosting.de) bereitgestellt.
Während der Beta ist ein Gameserver pro Konto kostenlos.
Authentifizierung
Das Control Panel nutzt das Session-Cookie hexa_session (HttpOnly, Secure, SameSite=Lax, 30 Tage).
Schreibende Anfragen mit Cookie müssen Content-Type: application/json senden.
Für eigene Skripte erstellst du im Control Panel einen API-Key und sendest ihn als Header:
Authorization: Bearer hx_live_…
Fehlerformat
Fehler werden mit passendem HTTP-Status und folgendem Aufbau geliefert:
{"error": {"code": "not_found", "message": "Ressource nicht gefunden."}}
Typische Status: 400 (ungültige Eingabe, z. B. plan_too_small,
missing_field), 401 (nicht angemeldet), 403 (limit_reached), 404 (nicht gefunden),
409 (Konflikt, z. B. Server installiert noch), 429 (zu viele Anfragen),
502 (panel_error), 503 (game_unavailable).
Endpunkte
| Methode | Pfad | Beschreibung | Auth |
|---|---|---|---|
| GET | / | Basisinformationen zur API | – |
| GET | /v1/health | Statusprüfung | – |
| GET | /v1/plans | Alle Gameserver-Tarife (Starter, Pro, Elite, Ultra) inkl. Ressourcen-Limits | – |
| GET | /v1/games | Verfügbare Spiele inkl. Mindesttarif und Pflichtfeldern (available = bestellbar) | – |
| POST | /v1/auth/register | Registrierung {email, password (min. 10 Zeichen), name} → 201 + Cookie | – |
| POST | /v1/auth/login | Anmeldung {email, password} → Cookie; max. 10 Versuche/Minute | – |
| POST | /v1/auth/logout | Abmeldung, löscht das Cookie → 204 | Cookie |
| GET | /v1/me | Eigenes Benutzerkonto | ja |
| PATCH | /v1/me | Name/Passwort ändern {name?, password?, current_password} | ja |
| GET | /v1/stats | Kennzahlen: Server gesamt, laufende Server, maximale Anzahl | ja |
| GET | /v1/limits | Serverkontingent {max_servers, used} | ja |
| GET | /v1/services | Alle eigenen Gameserver (Status live aus dem Panel) | ja |
| POST | /v1/services | Gameserver bestellen {plan_id, game_id, name, variables?} → 201 (Status installing) | ja |
| GET | /v1/services/{id} | Einzelner Gameserver inkl. Adresse, SFTP-Zugang und Panel-Link | ja |
| GET | /v1/services/{id}/resources | Live-Auslastung: CPU, RAM, Speicher, Netzwerk, Laufzeit | ja |
| POST | /v1/services/{id}/actions | Power-Aktion {action: start | stop | restart | kill} → 202 | ja |
| POST | /v1/services/{id}/reinstall | Gameserver neu installieren → 202 | ja |
| DELETE | /v1/services/{id} | Gameserver endgültig löschen (auch im Panel) → 204 | ja |
| GET | /v1/panel-account | Eigenes Pterodactyl-Panel-Konto {has_account, username, email, panel_url} | ja |
| POST | /v1/panel-account/reset-password | Neues Panel-Passwort erzeugen (wird nur einmal angezeigt) | ja |
| GET | /v1/api-keys | Eigene API-Keys | ja |
| POST | /v1/api-keys | API-Key erstellen {name} → 201, Token wird nur einmal angezeigt | ja |
| DELETE | /v1/api-keys/{id} | API-Key widerrufen → 204 | ja |
Beispiel
curl -X POST https://api.hexahosting.de/v1/services \
-H "Authorization: Bearer hx_live_…" -H "Content-Type: application/json" \
-d '{"plan_id": "game-m", "game_id": "minecraft-paper", "name": "Mein Server"}'
Der Server startet im Status installing. Mögliche Status:
installing, install_failed, offline, starting,
running, stopping, suspended, error.
Für FiveM/RedM ist variables.FIVEM_LICENSE Pflicht.
Preise werden in Cent angegeben (price_cents, Preis ab Launch),
Zeitstempel im ISO-8601-Format (UTC).