{
  "openapi": "3.0.4",
  "info": {
    "title": "Zenit Developer API",
    "description": "Steuere deine Gameserver bei Zenit Hosting per HTTP: Server lesen, starten und stoppen, Befehle senden, Backups anlegen und Deployments auslösen. Jeder Aufruf trägt ein Token im Header `Authorization: Bearer <token>`. Persönliche Tokens beginnen mit `zhp_`, Bot-Tokens mit `zhb_`. Welche Scopes ein Aufruf braucht, steht je Operation in `x-zenit-scopes`.\n\nFehler haben immer die Form `{ code, message, requestId, errors?, scope? }`. Listen liefern `{ data, nextCursor }`. Innerhalb von Version 1 kommen nur Felder und Werte dazu; ignoriere, was du nicht kennst.",
    "version": "1.0"
  },
  "paths": {
    "/api/developer/v1/events": {
      "get": {
        "tags": [
          "Bots und Events"
        ],
        "summary": "Events abholen",
        "description": "Nur mit Bot-Token. Folge-Feed für Bots ohne erreichbare Webhook-Adresse. Der Cursor heißt hier `after`. `nextCursor` ist nur `null`, wenn du ohne `after` abrufst und es noch kein Event gab. Dann rufst du weiter ohne `after` auf, sonst immer mit dem letzten `nextCursor`. Eine leere `data`-Liste heißt: aufgeholt. Der Feed liefert ein Event erst, wenn es mindestens 30 Sekunden alt ist. Für Echtzeit nutze Webhooks.",
        "operationId": "listEvents",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "description": "Folge-Cursor: der `nextCursor` des letzten Aufrufs. Ohne Wert beginnt der Feed beim ältesten verfügbaren Event.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Einträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevEventDtoPage"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN: Dieser Endpunkt nimmt nur Bot-Tokens an.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [ ]
      }
    },
    "/api/developer/v1/installations": {
      "get": {
        "tags": [
          "Bots und Events"
        ],
        "summary": "Installationen des Bots auflisten",
        "description": "Nur mit Bot-Token (ein persönliches Token bekommt 403 `FORBIDDEN`): alle Server, auf denen dieser Bot installiert ist, samt zugestimmten Scopes und abonnierten Events. Seitenweise Liste: `limit` (1 bis 100, Standard 25) und `cursor`. `nextCursor` ist `null` auf der letzten Seite, sonst der Wert für den nächsten Aufruf.",
        "operationId": "listInstallations",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Einträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Wert von `nextCursor` der vorherigen Seite. Nicht ändern, nicht auswerten. Ein ungültiger Cursor ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevInstallationDtoPage"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN: Dieser Endpunkt nimmt nur Bot-Tokens an.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [ ]
      }
    },
    "/api/developer/v1/me": {
      "get": {
        "tags": [
          "Zugang"
        ],
        "summary": "Eigene Identität lesen",
        "description": "Liefert den Aufrufer (persönliches Token oder Bot), die Scopes des Tokens und seine Eckdaten (Präfix, Ablauf, Serverbindung). Braucht keinen Scope und eignet sich, um ein Token zu prüfen.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevMeDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [ ]
      }
    },
    "/api/developer/v1/servers": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Server auflisten",
        "description": "Alle Server, auf die das Token zugreifen darf: bei persönlichen Tokens die eigenen und die freigegebenen Server, bei Bots die Server mit Installation. Ein auf Server eingeschränktes Token sieht nur diese. Seitenweise Liste: `limit` (1 bis 100, Standard 25) und `cursor`. `nextCursor` ist `null` auf der letzten Seite, sonst der Wert für den nächsten Aufruf.",
        "operationId": "listServers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Einträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Wert von `nextCursor` der vorherigen Seite. Nicht ändern, nicht auswerten. Ein ungültiger Cursor ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevServerDtoPage"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "servers:read"
        ]
      }
    },
    "/api/developer/v1/servers/{id}": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Server lesen",
        "description": "Stammdaten eines Servers: Status, Spiel, Ressourcen-Zuteilung und Adresse.",
        "operationId": "getServer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevServerDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "servers:read"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/activity": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Aktivität lesen",
        "description": "Der Aktivitätsverlauf des Servers, neueste zuerst, ohne Detailfelder. Seitenweise Liste: `limit` (1 bis 100, Standard 25) und `cursor`. `nextCursor` ist `null` auf der letzten Seite, sonst der Wert für den nächsten Aufruf.",
        "operationId": "listServerActivity",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Einträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Wert von `nextCursor` der vorherigen Seite. Nicht ändern, nicht auswerten. Ein ungültiger Cursor ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevActivityDtoPage"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "servers:read"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/backups": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Backups auflisten",
        "description": "Alle Backups des Servers. Die Liste ist kurz und hat deshalb keinen Cursor: `nextCursor` ist immer `null`.",
        "operationId": "listBackups",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevBackupPageDto"
                }
              }
            }
          },
          "400": {
            "description": "SERVER_NOT_READY (gespeicherter Zustand): Der Zustand des Servers erlaubt die Aktion nicht, etwa während der Installation oder wenn er gesperrt ist.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "409": {
            "description": "CONFLICT oder ein genauerer Code, zum Beispiel CAPACITY_UNAVAILABLE, START_BLOCKED oder IDEMPOTENCY_IN_PROGRESS. SERVER_NOT_READY nur, wenn das Panel ablehnt.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "backups:read"
        ]
      },
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Backup anlegen",
        "description": "Startet ein Backup im Hintergrund (202). Ein gesperrtes Backup (`isLocked`) löscht die automatische Rotation nicht.",
        "operationId": "createBackup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Empfohlen für jeden POST. 1 bis 128 sichtbare ASCII-Zeichen ohne Leerzeichen. Derselbe Schlüssel mit derselben Anfrage liefert innerhalb von 24 Stunden die gespeicherte Antwort (Header `Idempotency-Replayed: true`), mit einer anderen Anfrage 422, solange die erste läuft 409.",
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevCreateBackupRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true`, wenn die Antwort aus dem Speicher des `Idempotency-Key` wiederholt wird.",
                "schema": {
                  "enum": [
                    "true"
                  ],
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevBackupDto"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen, oder SERVER_NOT_READY (gespeicherter Zustand): Der Zustand des Servers erlaubt die Aktion nicht, etwa während der Installation oder wenn er gesperrt ist.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "409": {
            "description": "CONFLICT oder ein genauerer Code, zum Beispiel CAPACITY_UNAVAILABLE, START_BLOCKED oder IDEMPOTENCY_IN_PROGRESS. SERVER_NOT_READY nur, wenn das Panel ablehnt.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: Der `Idempotency-Key` gehört zu einer anderen Anfrage.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "backups:write"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/commands": {
      "post": {
        "tags": [
          "Server"
        ],
        "summary": "Konsolenbefehl senden",
        "description": "Übergibt einen Befehl (1 bis 1024 Zeichen) an die Konsole. Eine Antwort des Spiels gibt es nicht; Ausgaben liest du in der Konsole des Panels.",
        "operationId": "sendCommand",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Empfohlen für jeden POST. 1 bis 128 sichtbare ASCII-Zeichen ohne Leerzeichen. Derselbe Schlüssel mit derselben Anfrage liefert innerhalb von 24 Stunden die gespeicherte Antwort (Header `Idempotency-Replayed: true`), mit einer anderen Anfrage 422, solange die erste läuft 409.",
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevCommandRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true`, wenn die Antwort aus dem Speicher des `Idempotency-Key` wiederholt wird.",
                "schema": {
                  "enum": [
                    "true"
                  ],
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevCommandAcceptedDto"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen, oder SERVER_NOT_READY (gespeicherter Zustand): Der Zustand des Servers erlaubt die Aktion nicht, etwa während der Installation oder wenn er gesperrt ist.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "409": {
            "description": "CONFLICT oder ein genauerer Code, zum Beispiel CAPACITY_UNAVAILABLE, START_BLOCKED oder IDEMPOTENCY_IN_PROGRESS. SERVER_NOT_READY nur, wenn das Panel ablehnt.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: Der `Idempotency-Key` gehört zu einer anderen Anfrage.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "servers:console"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/git/deployments": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Deployments auflisten",
        "description": "Der Verlauf der Deployments des Servers. Seitenweise Liste: `limit` (1 bis 100, Standard 25) und `cursor`. `nextCursor` ist `null` auf der letzten Seite, sonst der Wert für den nächsten Aufruf.",
        "operationId": "listGitDeployments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Einträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Wert von `nextCursor` der vorherigen Seite. Nicht ändern, nicht auswerten. Ein ungültiger Cursor ergibt 400 `VALIDATION_ERROR`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevGitDeploymentDtoPage"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "git:read"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/git/deployments/{deploymentId}": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Deployment lesen",
        "description": "Ein Deployment mit Status, Phase und Fehlermeldung.",
        "operationId": "getGitDeployment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deploymentId",
            "in": "path",
            "description": "Id des Deployments.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevGitDeploymentDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "git:read"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/git/sources": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Git-Quellen auflisten",
        "description": "Die Git-Quellen des Servers ohne Zugangsdaten, Webhook-Secrets oder Deploy-Keys.",
        "operationId": "listGitSources",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DevGitSourceDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "git:read"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/git/sources/{sourceId}/deploy": {
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Deployment auslösen",
        "description": "Reiht ein Deployment mit dem Auslöser `api` ein (202). Ohne `sha` wird der Kopf des Branches ausgerollt. Wie ein Deploy aus CI oder per Push wartet es auf das Deploy-Zeitfenster der Quelle: die Antwort bleibt 202, der Lauf startet dann erst mit Beginn des Fensters. Erreicht die Quelle ihren Stundendeckel, kommt 429 `RATE_LIMITED` mit `Retry-After`.",
        "operationId": "deployGitSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "Id der Git-Quelle.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Empfohlen für jeden POST. 1 bis 128 sichtbare ASCII-Zeichen ohne Leerzeichen. Derselbe Schlüssel mit derselben Anfrage liefert innerhalb von 24 Stunden die gespeicherte Antwort (Header `Idempotency-Replayed: true`), mit einer anderen Anfrage 422, solange die erste läuft 409.",
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevGitDeployRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true`, wenn die Antwort aus dem Speicher des `Idempotency-Key` wiederholt wird.",
                "schema": {
                  "enum": [
                    "true"
                  ],
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevGitDeployAcceptedDto"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen, oder SERVER_NOT_READY (gespeicherter Zustand): Der Zustand des Servers erlaubt die Aktion nicht, etwa während der Installation oder wenn er gesperrt ist.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "409": {
            "description": "CONFLICT oder ein genauerer Code, zum Beispiel CAPACITY_UNAVAILABLE, START_BLOCKED oder IDEMPOTENCY_IN_PROGRESS. SERVER_NOT_READY nur, wenn das Panel ablehnt.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: Der `Idempotency-Key` gehört zu einer anderen Anfrage.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "git:deploy"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/power": {
      "post": {
        "tags": [
          "Server"
        ],
        "summary": "Power-Signal senden",
        "description": "Reiht `start`, `stop`, `restart` oder `kill` ein. Die Antwort 202 bestätigt nur das Einreihen; das Ergebnis steht im Aktivitätsverlauf. `killAfterSeconds` (10 bis 600) gilt nur für `stop`.",
        "operationId": "sendPowerSignal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Empfohlen für jeden POST. 1 bis 128 sichtbare ASCII-Zeichen ohne Leerzeichen. Derselbe Schlüssel mit derselben Anfrage liefert innerhalb von 24 Stunden die gespeicherte Antwort (Header `Idempotency-Replayed: true`), mit einer anderen Anfrage 422, solange die erste läuft 409.",
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[!-~]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevPowerRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true`, wenn die Antwort aus dem Speicher des `Idempotency-Key` wiederholt wird.",
                "schema": {
                  "enum": [
                    "true"
                  ],
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevPowerAcceptedDto"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_ERROR: Eingabe ungültig. `errors` nennt je Feld die Meldungen, oder SERVER_NOT_READY (gespeicherter Zustand): Der Zustand des Servers erlaubt die Aktion nicht, etwa während der Installation oder wenn er gesperrt ist.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "409": {
            "description": "CONFLICT oder ein genauerer Code, zum Beispiel CAPACITY_UNAVAILABLE, START_BLOCKED oder IDEMPOTENCY_IN_PROGRESS. SERVER_NOT_READY nur, wenn das Panel ablehnt.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED: Der `Idempotency-Key` gehört zu einer anderen Anfrage.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "servers:power"
        ]
      }
    },
    "/api/developer/v1/servers/{id}/resources": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Ressourcen lesen",
        "description": "Momentaufnahme aus dem Panel: Zustand, Arbeitsspeicher, CPU, Datenträger, Netzwerk und Laufzeit.",
        "operationId": "getServerResources",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id des Servers.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevServerResourcesDto"
                }
              }
            }
          },
          "401": {
            "description": "TOKEN_INVALID: Das Token fehlt, ist falsch, abgelaufen oder widerrufen. Der Grund wird bewusst nicht genannt.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Immer `Bearer error=\"invalid_token\"`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "403": {
            "description": "INSUFFICIENT_SCOPE (`scope` nennt den fehlenden Scope) oder FORBIDDEN (die Freigabe des handelnden Nutzers am Server fehlt).",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND: Unbekannt oder für dieses Token nicht sichtbar. Beides sieht gleich aus.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: Das Limit ist erreicht. `Retry-After` nennt die Wartezeit in Sekunden.",
            "headers": {
              "Retry-After": {
                "description": "Ganze Sekunden bis zum nächsten erlaubten Aufruf, mindestens 1.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR: Unerwarteter Fehler. Nenne dem Support die `requestId`.",
            "headers": {
              "X-Request-Id": {
                "description": "Id dieser Anfrage; gleich `requestId` im Fehlerkörper.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevErrorDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ZenitToken": [ ]
          }
        ],
        "x-zenit-scopes": [
          "servers:read"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DevActivityDto": {
        "required": [
          "category",
          "createdAt",
          "id",
          "serverId",
          "severity",
          "source",
          "title",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "serverId": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "type": "string",
            "description": "Gruppe des Eintrags.",
            "x-zenit-known-values": [
              "power",
              "lifecycle",
              "modpack",
              "addon",
              "file",
              "backup",
              "resource",
              "loader",
              "crash",
              "console",
              "git"
            ]
          },
          "type": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "description": "Gewicht des Eintrags.",
            "x-zenit-known-values": [
              "info",
              "success",
              "warning",
              "error"
            ]
          },
          "source": {
            "type": "string",
            "description": "Wer den Eintrag ausgelöst hat. `api` ist ein persönliches Token, `bot` ein Bot.",
            "x-zenit-known-values": [
              "user",
              "system",
              "job",
              "billing",
              "doctor",
              "api",
              "bot"
            ]
          },
          "title": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DevActivityDtoPage": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevActivityDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevBackupDto": {
        "required": [
          "bytes",
          "completedAt",
          "createdAt",
          "id",
          "isLocked",
          "isSuccessful",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "format": "int64"
          },
          "isSuccessful": {
            "type": "boolean"
          },
          "isLocked": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevBackupPageDto": {
        "required": [
          "data",
          "limit",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevBackupDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "limit": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "DevCommandAcceptedDto": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Immer `sent`.",
            "x-zenit-known-values": [
              "sent"
            ]
          }
        },
        "additionalProperties": false
      },
      "DevCommandRequest": {
        "required": [
          "command"
        ],
        "type": "object",
        "properties": {
          "command": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DevCreateBackupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 191,
            "type": "string",
            "nullable": true
          },
          "isLocked": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DevErrorDto": {
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Maschinenlesbarer Fehlercode. Unbekannte Codes behandelst du wie den HTTP-Status.",
            "x-zenit-known-values": [
              "TOKEN_INVALID",
              "INSUFFICIENT_SCOPE",
              "FORBIDDEN",
              "NOT_FOUND",
              "METHOD_NOT_ALLOWED",
              "VALIDATION_ERROR",
              "CONFLICT",
              "IDEMPOTENCY_IN_PROGRESS",
              "IDEMPOTENCY_KEY_REUSED",
              "RATE_LIMITED",
              "INTERNAL_ERROR",
              "DEVELOPER_FEATURE_UNAVAILABLE",
              "SERVER_NOT_READY",
              "GIT_DEPLOY_NOT_ALLOWED",
              "CAPACITY_UNAVAILABLE",
              "START_BLOCKED",
              "DEVELOPER_TOKEN_LIMIT_REACHED",
              "BOT_LIMIT_REACHED",
              "BOT_SLUG_TAKEN",
              "BOT_ALREADY_INSTALLED",
              "BOT_NOT_ACTIVE"
            ]
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "description": "Gleich dem Antwort-Header `X-Request-Id`. Nenne ihn dem Support."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Nur bei `VALIDATION_ERROR` mit Feldbezug: Feldname und Meldungen."
          },
          "scope": {
            "type": "string",
            "description": "Nur bei `INSUFFICIENT_SCOPE`: der Scope, den der Endpunkt verlangt."
          }
        },
        "additionalProperties": false
      },
      "DevEventDto": {
        "required": [
          "createdAt",
          "data",
          "id",
          "serverId",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "description": "Art des Events. Sie bestimmt die Form von `data`.",
            "x-zenit-known-values": [
              "server.activity",
              "installation.created",
              "installation.deleted",
              "ping"
            ]
          },
          "serverId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DevActivityDto"
              },
              {
                "$ref": "#/components/schemas/DevInstallationDto"
              },
              {
                "$ref": "#/components/schemas/DevPingDataDto"
              }
            ],
            "description": "Hängt von `type` ab: `server.activity` liefert eine Aktivität, `installation.created` und `installation.deleted` eine Installation, `ping` die Daten der Testzustellung."
          }
        },
        "additionalProperties": false
      },
      "DevEventDtoPage": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevEventDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevGitDeployAcceptedDto": {
        "required": [
          "deploymentId",
          "status"
        ],
        "type": "object",
        "properties": {
          "deploymentId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DevGitDeployRequest": {
        "type": "object",
        "properties": {
          "sha": {
            "maxLength": 64,
            "pattern": "^[0-9a-fA-F]{7,64}$",
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevGitDeploymentDto": {
        "required": [
          "branch",
          "commitMessage",
          "createdAt",
          "deployedSha",
          "errorCode",
          "finishedAt",
          "id",
          "kind",
          "message",
          "phase",
          "sourceId",
          "startedAt",
          "status",
          "targetSha",
          "trigger"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "trigger": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "phase": {
            "type": "string",
            "nullable": true
          },
          "branch": {
            "type": "string"
          },
          "targetSha": {
            "type": "string",
            "nullable": true
          },
          "deployedSha": {
            "type": "string",
            "nullable": true
          },
          "commitMessage": {
            "type": "string",
            "nullable": true
          },
          "errorCode": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevGitDeploymentDtoPage": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevGitDeploymentDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevGitSourceDto": {
        "required": [
          "autoDeploy",
          "branch",
          "createdAt",
          "id",
          "lastDeployment",
          "name",
          "provider",
          "repository",
          "repositoryUrl",
          "status",
          "targetDirectory"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "repository": {
            "type": "string"
          },
          "repositoryUrl": {
            "type": "string",
            "nullable": true
          },
          "branch": {
            "type": "string"
          },
          "targetDirectory": {
            "type": "string"
          },
          "autoDeploy": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "lastDeployment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DevGitDeploymentDto"
              }
            ],
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DevInstallationDto": {
        "required": [
          "createdAt",
          "eventTypes",
          "grantedScopes",
          "id",
          "serverId",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "serverId": {
            "type": "string",
            "format": "uuid"
          },
          "grantedScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "description": "Zustand der Installation.",
            "x-zenit-known-values": [
              "active",
              "suspended"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DevInstallationDtoPage": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevInstallationDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevMeBotDto": {
        "required": [
          "id",
          "name",
          "slug"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DevMeDto": {
        "required": [
          "actor",
          "bot",
          "scopes",
          "token",
          "user"
        ],
        "type": "object",
        "properties": {
          "actor": {
            "type": "string",
            "description": "Art des Tokens: `pat` ist ein persönliches Token, `bot` ein Bot-Token.",
            "x-zenit-known-values": [
              "pat",
              "bot"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DevMeUserDto"
              }
            ],
            "nullable": true
          },
          "bot": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DevMeBotDto"
              }
            ],
            "nullable": true
          },
          "token": {
            "$ref": "#/components/schemas/DevMeTokenDto"
          }
        },
        "additionalProperties": false
      },
      "DevMeTokenDto": {
        "required": [
          "displayPrefix",
          "expiresAt",
          "serverRestricted"
        ],
        "type": "object",
        "properties": {
          "displayPrefix": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "serverRestricted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DevMeUserDto": {
        "required": [
          "id",
          "username"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "username": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DevPingDataDto": {
        "required": [
          "botId",
          "message"
        ],
        "type": "object",
        "properties": {
          "botId": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DevPowerAcceptedDto": {
        "required": [
          "deduped",
          "jobId",
          "signal"
        ],
        "type": "object",
        "properties": {
          "signal": {
            "type": "string"
          },
          "jobId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "deduped": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DevPowerRequest": {
        "required": [
          "signal"
        ],
        "type": "object",
        "properties": {
          "signal": {
            "maxLength": 16,
            "minLength": 1,
            "type": "string",
            "description": "Das Signal.",
            "x-zenit-known-values": [
              "start",
              "stop",
              "restart",
              "kill"
            ]
          },
          "killAfterSeconds": {
            "maximum": 600,
            "minimum": 10,
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevServerDto": {
        "required": [
          "address",
          "cpuPercent",
          "createdAt",
          "diskMb",
          "game",
          "id",
          "isOwner",
          "location",
          "memoryMb",
          "name",
          "powerState",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Zustand des Servers in Zenit.",
            "x-zenit-known-values": [
              "provisioning",
              "ready",
              "setup_required",
              "crashed",
              "busy",
              "suspended",
              "archived",
              "failed",
              "deleted",
              "unknown"
            ]
          },
          "powerState": {
            "type": "string",
            "description": "Zuletzt gemeldeter Betriebszustand; `null`, wenn unbekannt.",
            "nullable": true,
            "x-zenit-known-values": [
              "running",
              "starting",
              "stopping",
              "offline"
            ]
          },
          "game": {
            "$ref": "#/components/schemas/DevServerGameDto"
          },
          "memoryMb": {
            "type": "integer",
            "format": "int32"
          },
          "cpuPercent": {
            "type": "integer",
            "format": "int32"
          },
          "diskMb": {
            "type": "integer",
            "format": "int32"
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "isOwner": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DevServerDtoPage": {
        "required": [
          "data",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevServerDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevServerGameDto": {
        "required": [
          "name",
          "variant",
          "version"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "variant": {
            "type": "string"
          },
          "version": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DevServerResourcesDto": {
        "required": [
          "cpu",
          "diskBytes",
          "isSuspended",
          "memoryBytes",
          "networkRxBytes",
          "networkTxBytes",
          "state",
          "uptimeMs"
        ],
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "description": "Betriebszustand laut Panel.",
            "x-zenit-known-values": [
              "running",
              "starting",
              "stopping",
              "offline",
              "installing",
              "failed",
              "unknown"
            ]
          },
          "isSuspended": {
            "type": "boolean"
          },
          "memoryBytes": {
            "type": "integer",
            "format": "int64"
          },
          "cpu": {
            "type": "number",
            "format": "double"
          },
          "diskBytes": {
            "type": "integer",
            "format": "int64"
          },
          "networkRxBytes": {
            "type": "integer",
            "format": "int64"
          },
          "networkTxBytes": {
            "type": "integer",
            "format": "int64"
          },
          "uptimeMs": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ZenitToken": {
        "type": "http",
        "description": "Ein persönliches Token legst du im Kundenbereich unter Zugriffstokens an, ein Bot-Token unter Bots. Die Scopes des Tokens bestimmen, was es darf.",
        "scheme": "bearer",
        "bearerFormat": "zhp_ (persönlich) oder zhb_ (Bot), insgesamt 42 Zeichen"
      }
    }
  },
  "tags": [
    {
      "name": "Zugang",
      "description": "Wer ruft an und mit welchen Rechten."
    },
    {
      "name": "Server",
      "description": "Server lesen, starten, stoppen und Konsolenbefehle senden."
    },
    {
      "name": "Backups",
      "description": "Backups eines Servers lesen und anlegen."
    },
    {
      "name": "Bots und Events",
      "description": "Installationen und Events für Bot-Tokens."
    },
    {
      "name": "Git",
      "description": "Git-Quellen und Deployments eines Servers."
    }
  ]
}