API

Monitors

API-Referenz für Monitors: jeder Handler mit seinen Feldern und einem Beispiel.

Stand:

monitor: detail

Monitor abrufen

Liefert einen einzelnen Monitor per ID mit Ziel-URL, verknüpfter Komponente und Prüfintervall.

  • Benötigter Scope: monitors:read
  • Endpunkt: POST /api/query
Feld Typ Pflicht Beschreibung
id string (uuid) ja

Beispielanfrage

curl -X POST https://status.example.com/api/query \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:query:monitor:detail",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}'

monitor: list

Monitore auflisten

Liefert eine gefilterte, seitenweise Liste der Monitore mit Ziel-URL, Prüfintervall und Aktivstatus.

  • Benötigter Scope: monitors:read
  • Endpunkt: POST /api/query
Feld Typ Pflicht Beschreibung
cursor string nein Position aus nextCursor der vorherigen Seite.
limit integer nein Zeilen pro Seite, standardmäßig 50, höchstens 200.
search string nein Volltextsuche über die durchsuchbaren Felder.
sort string nein Feld, nach dem sortiert wird.
sortDirection “asc” | “desc” nein asc oder desc.
offset integer nein Anzahl der zu überspringenden Zeilen. Nutze besser cursor zum Blättern.
totalCount boolean nein Mit true bekommst du zusätzlich total, die Anzahl der passenden Zeilen.
includeDeleted boolean nein Mit true sind gelöschte Zeilen enthalten. Nur für Entitäten mit Soft Delete.
onlyDeleted boolean nein Mit true kommen nur gelöschte Zeilen zurück. Nur für Entitäten mit Soft Delete, nicht zusammen mit includeDeleted.
filter object nein Ein Feldfilter mit field, op und value. op ist einer von eq, ne, lt, gt, lte, gte, in.
filter.field string ja
filter.op “eq” | “ne” | “lt” | “gt” | “lte” | “gte” | “in” ja
filter.value any ja
filters array of object nein Mehrere Feldfilter, je mit field, op und value. op ist einer von eq, ne, lt, gt, lte, gte, in.
namedFilter string nein Name eines vordefinierten Filters der Entität, zum Beispiel einer Arbeitsliste.
aggregate object nein Liefert aggregierte Werte statt Zeilen.
aggregate.groupBy string nein
aggregate.measures array of object nein

Beispielanfrage

curl -X POST https://status.example.com/api/query \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:query:monitor:list",
  "payload": {}
}'

Beispielantwort

Status: 200

{
  "data": {
    "rows": [
      {
        "id": "00000000-0000-4000-8000-000000000001",
        "tenantId": "00000000-0000-4000-8000-000000000002",
        "version": 1,
        "insertedAt": "2026-01-15T09:30:00.000Z",
        "modifiedAt": null,
        "insertedById": "00000000-0000-4000-8000-000000000003",
        "modifiedById": null,
        "name": "API health",
        "kind": "http",
        "url": "http://93.184.216.34/",
        "keyword": null,
        "keywordMode": "contains",
        "host": null,
        "port": null,
        "sslWarnDays": 14,
        "componentId": "00000000-0000-4000-8000-000000000004",
        "intervalSeconds": "300",
        "graceSeconds": 59,
        "enabled": true,
        "_refs": {
          "componentId": {
            "id": "00000000-0000-4000-8000-000000000004",
            "tenantId": "00000000-0000-4000-8000-000000000002",
            "version": 1,
            "insertedAt": "2026-01-15T09:30:00.000Z",
            "modifiedAt": null,
            "insertedById": "00000000-0000-4000-8000-000000000003",
            "modifiedById": null,
            "name": "API",
            "description": null,
            "status": "operational",
            "parentComponentId": null,
            "displayOrder": 0,
            "showOnPage": true,
            "customFields": {}
          }
        }
      }
    ],
    "nextCursor": null
  }
}

monitor: uptime-public

Verfügbarkeit eines Monitors abrufen

Liefert den öffentlichen Verlauf von Verfügbarkeit und Antwortzeit eines Monitors, beschränkt auf Monitore, die mit einer öffentlich angezeigten Komponente verknüpft sind.

  • Benötigter Scope: monitors:read
  • Endpunkt: POST /api/query
Feld Typ Pflicht Beschreibung
monitorId string (uuid) ja
range “24h” | “30d” nein

Beispielanfrage

curl -X POST https://status.example.com/api/query \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:query:monitor:uptime-public",
  "payload": {
    "monitorId": "00000000-0000-4000-8000-000000000001",
    "range": "24h"
  }
}'

monitor: check-now

Monitor-Prüfung sofort starten

Prüft das Ziel eines Monitors sofort und hält Erreichbarkeit und Antwortzeit fest.

  • Benötigter Scope: monitors:write
  • Endpunkt: POST /api/write
Feld Typ Pflicht Beschreibung
monitorId string (uuid) ja

Beispielanfrage

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:monitor:check-now",
  "payload": {
    "monitorId": "00000000-0000-4000-8000-000000000001"
  }
}'

monitor: create

Monitor anlegen

Legt einen neuen Monitor an (HTTP, Stichwort, SSL-Ablauf, TCP-Port oder Heartbeat), der sein Ziel regelmäßig prüft und die Verfügbarkeit aufzeichnet.

  • Benötigter Scope: monitors:write
  • Endpunkt: POST /api/write
Feld Typ Pflicht Beschreibung
name string ja Name
kind “http” | “keyword” | “ssl-expiry” | “heartbeat” | “tcp-port” nein Art der Prüfung
url string nein URL
keyword string nein Schlüsselwort
keywordMode “contains” | “not-contains” nein Bedingung
host string nein Host
port integer nein Port
sslWarnDays integer nein Warnung vor Ablauf (Tage)
componentId string (uuid) nein Komponente
intervalSeconds “60” | “300” | “600” | “1800” | “3600” | “21600” | “43200” | “86400” | “604800” nein Prüf-Intervall
graceSeconds integer nein Karenzzeit (Sekunden)
enabled boolean nein Aktiv

Beispielanfrage

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:monitor:create",
  "payload": {
    "name": "API health",
    "url": "http://93.184.216.34/",
    "componentId": "00000000-0000-4000-8000-000000000001"
  }
}'

Beispielantwort

Status: 200

{
  "isSuccess": true,
  "data": {
    "kind": "save",
    "id": "00000000-0000-4000-8000-000000000002",
    "data": {
      "id": "00000000-0000-4000-8000-000000000002",
      "tenantId": "00000000-0000-4000-8000-000000000003",
      "version": 1,
      "insertedAt": "2026-01-15T09:30:00.000Z",
      "modifiedAt": null,
      "insertedById": "00000000-0000-4000-8000-000000000004",
      "modifiedById": null,
      "name": "API health",
      "kind": "http",
      "url": "http://93.184.216.34/",
      "keyword": null,
      "keywordMode": "contains",
      "host": null,
      "port": null,
      "sslWarnDays": 14,
      "componentId": "00000000-0000-4000-8000-000000000001",
      "intervalSeconds": "300",
      "graceSeconds": 59,
      "enabled": true
    },
    "changes": {
      "name": "API health",
      "kind": "http",
      "url": "http://93.184.216.34/",
      "keywordMode": "contains",
      "sslWarnDays": 14,
      "componentId": "00000000-0000-4000-8000-000000000001",
      "intervalSeconds": "300",
      "graceSeconds": 59,
      "enabled": true
    },
    "previous": {},
    "isNew": true,
    "entityName": "monitor"
  }
}

monitor: delete

Monitor löschen

Löscht einen Monitor endgültig und beendet seine regelmäßigen Prüfungen.

  • Benötigter Scope: monitors:write
  • Endpunkt: POST /api/write
Feld Typ Pflicht Beschreibung
id string (uuid) ja

Beispielanfrage

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:monitor:delete",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}'

monitor: mint-heartbeat-token

Heartbeat-Token erzeugen

Erzeugt ein neues Ping-Token für einen Heartbeat-Monitor und gibt die vollständige Ping-URL einmal zurück. Ein früheres Token funktioniert danach nicht mehr.

  • Benötigter Scope: monitors:write
  • Endpunkt: POST /api/write
Feld Typ Pflicht Beschreibung
monitorId string (uuid) ja

Beispielanfrage

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:monitor:mint-heartbeat-token",
  "payload": {
    "monitorId": "00000000-0000-4000-8000-000000000001"
  }
}'

monitor: update

Monitor ändern

Ändert die Einstellungen eines Monitors, etwa Ziel, Prüfintervall oder die zugeordnete Komponente.

  • Benötigter Scope: monitors:write
  • Endpunkt: POST /api/write
Feld Typ Pflicht Beschreibung
id string (uuid) ja
version number ja
changes object ja
changes.name string nein Name
changes.kind “http” | “keyword” | “ssl-expiry” | “heartbeat” | “tcp-port” nein Art der Prüfung
changes.url string | null nein URL
changes.keyword string | null nein Schlüsselwort
changes.keywordMode “contains” | “not-contains” nein Bedingung
changes.host string | null nein Host
changes.port integer | null nein Port
changes.sslWarnDays integer nein Warnung vor Ablauf (Tage)
changes.componentId string (uuid) | null nein Komponente
changes.intervalSeconds “60” | “300” | “600” | “1800” | “3600” | “21600” | “43200” | “86400” | “604800” nein Prüf-Intervall
changes.graceSeconds integer nein Karenzzeit (Sekunden)
changes.enabled boolean nein Aktiv

Beispielanfrage

curl -X POST https://status.example.com/api/write \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "publicstatus:write:monitor:update",
  "payload": {
    "id": "00000000-0000-4000-8000-000000000001",
    "version": 1,
    "changes": {
      "name": "text",
      "kind": "http",
      "url": "text",
      "keyword": "text",
      "keywordMode": "contains",
      "host": "text",
      "port": 1,
      "sslWarnDays": 1,
      "componentId": "00000000-0000-4000-8000-000000000001",
      "intervalSeconds": "60",
      "graceSeconds": 1,
      "enabled": true
    }
  }
}'