Zum Hauptinhalt springenZenit-Hosting Logo
API-Referenz

Bots und Events

Installationen und Events für Bot-Tokens.

GET /api/developer/v1/events

Events abholen

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.

Parameter

Parameter von GET /api/developer/v1/events
NameOrtTypPflichtBeschreibung
afterQuerystringneinFolge-Cursor: der `nextCursor` des letzten Aufrufs. Ohne Wert beginnt der Feed beim ältesten verfügbaren Event.
limitQueryinteger (int32)neinEinträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.

Antworten

OK

application/json

SchemaDevEventDtoPage
Felder der Antwort 200 OK von GET /api/developer/v1/events
FeldTypPflichtBeschreibung
dataDevEventDto[]ja
data[].idstring (uuid)ja
data[].typestringjaArt des Events. Sie bestimmt die Form von `data`.
data[].serverIdstring (uuid) | nullja
data[].createdAtstring (date-time)ja
data[].dataDevActivityDto | DevInstallationDto | DevPingDataDtojaHängt von `type` ab: `server.activity` liefert eine Aktivität, `installation.created` und `installation.deleted` eine Installation, `ping` die Daten der Testzustellung.
data[].data (DevActivityDto).idstring (uuid)ja
data[].data (DevActivityDto).serverIdstring (uuid)ja
data[].data (DevActivityDto).categorystringjaGruppe des Eintrags.
data[].data (DevActivityDto).typestringja
data[].data (DevActivityDto).severitystringjaGewicht des Eintrags.
data[].data (DevActivityDto).sourcestringjaWer den Eintrag ausgelöst hat. `api` ist ein persönliches Token, `bot` ein Bot.
data[].data (DevActivityDto).titlestringja
data[].data (DevActivityDto).createdAtstring (date-time)ja
data[].data (DevInstallationDto).idstring (uuid)ja
data[].data (DevInstallationDto).serverIdstring (uuid)ja
data[].data (DevInstallationDto).grantedScopesstring[]ja
data[].data (DevInstallationDto).eventTypesstring[]ja
data[].data (DevInstallationDto).statusstringjaZustand der Installation.
data[].data (DevInstallationDto).createdAtstring (date-time)ja
data[].data (DevPingDataDto).botIdstring (uuid)ja
data[].data (DevPingDataDto).messagestringja
nextCursorstring | nullja
{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "type": "string",
      "serverId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "createdAt": "2026-10-05T12:00:00Z",
      "data": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "serverId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "category": "string",
        "type": "string",
        "severity": "string",
        "source": "string",
        "title": "string",
        "createdAt": "2026-10-05T12:00:00Z"
      }
    }
  ],
  "nextCursor": "string"
}

Codebeispiele

curl "https://api.zenit-hosting.de/api/developer/v1/events" \
  -H "Authorization: Bearer $ZENIT_TOKEN"

GET /api/developer/v1/installations

Installationen des Bots auflisten

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.

Parameter

Parameter von GET /api/developer/v1/installations
NameOrtTypPflichtBeschreibung
limitQueryinteger (int32)neinEinträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`.
cursorQuerystringneinWert von `nextCursor` der vorherigen Seite. Nicht ändern, nicht auswerten. Ein ungültiger Cursor ergibt 400 `VALIDATION_ERROR`.

Antworten

OK

application/json

SchemaDevInstallationDtoPage
Felder der Antwort 200 OK von GET /api/developer/v1/installations
FeldTypPflichtBeschreibung
dataDevInstallationDto[]ja
data[].idstring (uuid)ja
data[].serverIdstring (uuid)ja
data[].grantedScopesstring[]ja
data[].eventTypesstring[]ja
data[].statusstringjaZustand der Installation.
data[].createdAtstring (date-time)ja
nextCursorstring | nullja
{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "serverId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "grantedScopes": [
        "string"
      ],
      "eventTypes": [
        "string"
      ],
      "status": "string",
      "createdAt": "2026-10-05T12:00:00Z"
    }
  ],
  "nextCursor": "string"
}

Codebeispiele

curl "https://api.zenit-hosting.de/api/developer/v1/installations" \
  -H "Authorization: Bearer $ZENIT_TOKEN"

Bereich Bots und Events geladen, 2 Endpunkte.