REST API · v1

API-Referenz

Die Avenlith-API folgt REST: Sie akzeptiert JSON, liefert JSON und nutzt Standard-HTTP-Statuscodes sowie Bearer-Token-Authentifizierung.

Basis-URLhttps://api.avenlith.com/v1

Server

Server auflisten

GET/servers

Liefert alle Server im Projekt des Tokens, neueste zuerst.

Parameter

  • regionstringqueryoptional

    Nach Regionscode filtern, z. B. `ist1`.

  • labelstringqueryoptional

    Nach Label filtern, z. B. `role=web`.

  • per_pageintegerqueryoptional

    Einträge pro Seite, 1–200. Standard 50.

  • cursorstringqueryoptional

    Cursor aus `meta.next_cursor` der vorherigen Seite.

Anfrage

Shell
curl -X GET https://api.avenlith.com/v1/servers \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{
  "data": [{
      "id": "srv_8f2k1",
      "name": "web-01",
      "status": "running",
      "plan": "vps-pro",
      "region": "ist1",
      "image": "ubuntu-26.04",
      "ipv4": "203.0.113.24",
      "ipv6": "2a0f:9400:7a00::1",
      "shield": "standard",
      "labels": { "role": "web" },
      "created_at": "2026-09-18T09:12:44Z"
    }],
  "meta": { "per_page": 50, "next_cursor": null }
}

Server erstellen

POST/servers

Erstellt einen Cloud-Server. Die Antwort kommt sofort mit Status provisioning; meist ist der Server nach 40 Sekunden running.

Parameter

  • namestringbodyerforderlich

    Hostname, 1–63 Zeichen.

  • planstringbodyerforderlich

    Tarif-Slug, z. B. `vps-pro`.

  • regionstringbodyerforderlich

    Regionscode.

  • imagestringbodyerforderlich

    Image-Slug oder Snapshot-ID.

  • ssh_keysstring[]bodyoptional

    IDs der zu installierenden SSH-Schlüssel.

  • shieldstringbodyoptional

    `standard` (Standard), `advanced` oder `enterprise`.

  • labelsobjectbodyoptional

    Key/Value-Labels für Filter und Firewalls.

Anfrage

Shell
curl -X POST https://api.avenlith.com/v1/servers \
  -H "Authorization: Bearer $AVENLITH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "web-01", "plan": "vps-pro", "region": "ist1", "image": "ubuntu-26.04", "ssh_keys": ["key_31xa"], "shield": "advanced", "labels": { "role": "web" } }'

Antwort

JSON
{
  "id": "srv_8f2k1",
  "name": "web-01",
  "status": "provisioning",
  "plan": "vps-pro",
  "region": "ist1",
  "image": "ubuntu-26.04",
  "ipv4": "203.0.113.24",
  "ipv6": "2a0f:9400:7a00::1",
  "shield": "standard",
  "labels": { "role": "web" },
  "created_at": "2026-09-18T09:12:44Z"
}

Server abrufen

GET/servers/{id}

Liefert einen einzelnen Server.

Parameter

  • idstringpatherforderlich

    Server-ID, z. B. `srv_8f2k1`.

Anfrage

Shell
curl -X GET https://api.avenlith.com/v1/servers/{id} \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{
  "id": "srv_8f2k1",
  "name": "web-01",
  "status": "running",
  "plan": "vps-pro",
  "region": "ist1",
  "image": "ubuntu-26.04",
  "ipv4": "203.0.113.24",
  "ipv6": "2a0f:9400:7a00::1",
  "shield": "standard",
  "labels": { "role": "web" },
  "created_at": "2026-09-18T09:12:44Z"
}

Server neu starten

POST/servers/{id}/actions/reboot

Sendet einen ACPI-Neustart. Mit "hard": true wird ein nicht reagierender Server stromlos neu gestartet.

Parameter

  • idstringpatherforderlich

    Server-ID, z. B. `srv_8f2k1`.

  • hardbooleanbodyoptional

    Stromlos statt geordnet neu starten.

Anfrage

Shell
curl -X POST https://api.avenlith.com/v1/servers/{id}/actions/reboot \
  -H "Authorization: Bearer $AVENLITH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hard": false }'

Antwort

JSON
{ "action_id": "act_2Lw9", "status": "in_progress" }

Server löschen

DELETE/servers/{id}

Löscht den Server und seine Festplatten dauerhaft. Snapshots und Backups bleiben erhalten.

Parameter

  • idstringpatherforderlich

    Server-ID, z. B. `srv_8f2k1`.

Anfrage

Shell
curl -X DELETE https://api.avenlith.com/v1/servers/{id} \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{ "deleted": true }

Netzwerk

Private Netzwerke auflisten

GET/networks

Liefert private Netzwerke und ihre Server.

Parameter

  • per_pageintegerqueryoptional

    Einträge pro Seite, 1–200. Standard 50.

  • cursorstringqueryoptional

    Cursor aus `meta.next_cursor` der vorherigen Seite.

Anfrage

Shell
curl -X GET https://api.avenlith.com/v1/networks \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{
  "data": [
    { "id": "net_5d1q", "name": "app-net", "region": "ist1", "cidr": "10.20.0.0/24", "servers": ["srv_8f2k1", "srv_9a7c3"] }
  ],
  "meta": { "per_page": 50, "next_cursor": null }
}

Floating IP zuweisen

POST/floating-ips/{ip}/assign

Verschiebt eine Floating IP auf einen anderen Server derselben Region. Der Traffic wechselt in unter einer Sekunde.

Parameter

  • ipstringpatherforderlich

    Die Floating-IP-Adresse.

  • server_idstringbodyerforderlich

    Ziel-Server-ID.

Anfrage

Shell
curl -X POST https://api.avenlith.com/v1/floating-ips/{ip}/assign \
  -H "Authorization: Bearer $AVENLITH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "server_id": "srv_9a7c3" }'

Antwort

JSON
{ "ip": "203.0.113.50", "server_id": "srv_9a7c3", "region": "ist1" }

Shield

Angriffe auflisten

GET/shield/attacks

Liefert abgewehrte Angriffe auf das Projekt mit Vektoren und Spitzenwerten.

Parameter

  • sincestringqueryoptional

    ISO-8601-Datum oder relativer Wert wie `7d`.

  • targetstringqueryoptional

    Nach angegriffener IP filtern.

  • per_pageintegerqueryoptional

    Einträge pro Seite, 1–200. Standard 50.

Anfrage

Shell
curl -X GET https://api.avenlith.com/v1/shield/attacks \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{
  "data": [
    {
      "id": "atk_9Qx2",
      "target": "203.0.113.24",
      "vectors": ["udp_amplification", "syn_flood"],
      "peak_bps": 412000000000,
      "peak_pps": 38200000,
      "started_at": "2026-09-18T21:04:11Z",
      "ended_at": "2026-09-18T21:31:40Z"
    }
  ],
  "meta": { "per_page": 50, "next_cursor": null }
}

Filterregel erstellen

POST/shield/rules

Wendet ein Filterprofil auf einen Portbereich einer IP-Adresse an.

Parameter

  • targetstringbodyerforderlich

    Geschützte IP-Adresse.

  • protocolstringbodyerforderlich

    `tcp` oder `udp`.

  • portsstringbodyerforderlich

    Einzelport oder Bereich, z. B. `27015-27030`.

  • profilestringbodyerforderlich

    Profil-Slug, siehe Filterprofile.

Anfrage

Shell
curl -X POST https://api.avenlith.com/v1/shield/rules \
  -H "Authorization: Bearer $AVENLITH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "target": "203.0.113.24", "protocol": "udp", "ports": "27015-27030", "profile": "game-source" }'

Antwort

JSON
{ "id": "rule_7Fk2", "target": "203.0.113.24", "protocol": "udp", "ports": "27015-27030", "profile": "game-source", "active": true }

Konto & Abrechnung

SSH-Schlüssel auflisten

GET/ssh-keys

Liefert die SSH-Schlüssel für neue Server.

Anfrage

Shell
curl -X GET https://api.avenlith.com/v1/ssh-keys \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{
  "data": [
    { "id": "key_31xa", "name": "laptop", "fingerprint": "SHA256:Qm4b…9Zs", "created_at": "2026-05-02T08:00:00Z" }
  ]
}

SSH-Schlüssel hinzufügen

POST/ssh-keys

Lädt einen öffentlichen Schlüssel hoch. Ed25519 und RSA (ab 3072 Bit) werden akzeptiert.

Parameter

  • namestringbodyerforderlich

    Anzeigename.

  • public_keystringbodyerforderlich

    Öffentlicher Schlüssel im OpenSSH-Format.

Anfrage

Shell
curl -X POST https://api.avenlith.com/v1/ssh-keys \
  -H "Authorization: Bearer $AVENLITH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "laptop", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… you@company.com" }'

Antwort

JSON
{ "id": "key_31xa", "name": "laptop", "fingerprint": "SHA256:Qm4b…9Zs" }

Rechnungen auflisten

GET/invoices

Liefert Rechnungen mit Summen und PDF-Link.

Parameter

  • statusstringqueryoptional

    `open`, `paid` oder `overdue`.

  • per_pageintegerqueryoptional

    Einträge pro Seite, 1–200. Standard 50.

  • cursorstringqueryoptional

    Cursor aus `meta.next_cursor` der vorherigen Seite.

Anfrage

Shell
curl -X GET https://api.avenlith.com/v1/invoices \
  -H "Authorization: Bearer $AVENLITH_TOKEN"

Antwort

JSON
{
  "data": [
    { "id": "inv_2026_0913", "status": "paid", "currency": "EUR", "total": 812.40, "issued_at": "2026-09-01", "pdf_url": "https://console.avenlith.com/invoices/inv_2026_0913.pdf" }
  ],
  "meta": { "per_page": 50, "next_cursor": null }
}