API-Referenz¶
Die vollständige API-Referenz wird aus dem FastAPI-OpenAPI-Schema generiert.
Live-Schema¶
Auf jeder Vesana-Instanz unter:
https://deine-domain.tld/openapi.json — Schema (JSON)
https://deine-domain.tld/docs — Swagger-UI
https://deine-domain.tld/redoc — Redoc
Swagger-UI ist interaktiv: Endpoints aufklappen, Test-Anfragen direkt mit eingeloggtem Token absetzen.
Kategorisierte Endpoints¶
Auth¶
POST /api/v1/auth/login— Benutzername + Passwort (optionalremember); bei 2FA folgtchallenge_tokenPOST /api/v1/auth/2fa/verifyPOST /api/v1/auth/refresh— rotiert das Refresh-Token; die Kette endet spätestens an der absoluten Sitzungs-FristPOST /api/v1/auth/logout— beendet die Sitzung serverseitigGET /api/v1/auth/mePUT /api/v1/auth/preferencesGET /api/v1/auth/sso/{provider}/start— SSO-Anmeldung (OIDC)POST /api/v1/auth/change-password— meldet alle anderen Sitzungen ab
Heikle Aktionen antworten mit 403 und {"code": "STEP_UP_REQUIRED"}, bis die Identität frisch bestätigt wurde (siehe Sitzungen). Objekte fremder Tenants antworten mit 404, nie mit 403.
Collector-API-Keys (/collectors/{id}/...) und Agent-Tokens (/hosts/{id}/agent-token) sind eigene Auth-Mechanismen für Collectors/Agents — kein User-API-Auth, siehe Auth-Flow.
Hosts und Services¶
GET /api/v1/hosts/POST /api/v1/hosts/GET /api/v1/hosts/{id}PATCH /api/v1/hosts/{id}DELETE /api/v1/hosts/{id}POST /api/v1/host-services/PATCH /api/v1/host-services/{id}DELETE /api/v1/host-services/{id}POST /api/v1/host-services/{id}/ackDELETE /api/v1/host-services/{id}/ack
Profile¶
GET /api/v1/profiles/POST /api/v1/profiles/GET /api/v1/profiles/{id}PATCH /api/v1/profiles/{id}DELETE /api/v1/profiles/{id}GET /api/v1/profiles/{id}/usagePOST /api/v1/profiles/{id}/cloneGET /api/v1/profiles/{id}/export— Profil als Bundle (inkl. referenzierter Scripts)POST /api/v1/profiles/import— Bundle importierenPOST /api/v1/profiles/{id}/applyGET /api/v1/community/browse— Community-Hub durchsuchenGET /api/v1/community/profile/{id}— Community-DetailPOST /api/v1/community/import— aus dem Hub importierenGET /api/v1/community/updates— Update-Check für importierte ProfileGET /api/v1/community/update/{id}/preview— Diff-VorschauPOST /api/v1/community/update/{id}— Update übernehmen
Discovery + SNMP¶
POST /api/v1/discovery/network-scanGET /api/v1/discovery/scans/{id}GET /api/v1/discovery/resultsPOST /api/v1/discovery/results/{id}/addPOST /api/v1/discovery/results/bulk-addPOST /api/v1/snmp-discovery/walksGET /api/v1/snmp-discovery/walks/{id}POST /api/v1/snmp-discovery/walks/{id}/apply
Alert-Rules + Channels¶
GET /api/v1/alert-rules/POST /api/v1/alert-rules/POST /api/v1/alert-rules/{id}/testGET /api/v1/notification-channels/POST /api/v1/notification-channels/POST /api/v1/notification-channels/{id}/test
Downtimes + ACK¶
GET /api/v1/downtimes/POST /api/v1/downtimes/POST /api/v1/downtimes/bulk— mehrere Checks auf einmalDELETE /api/v1/downtimes/{id}
Logs¶
POST /api/v1/logs/ingestGET /api/v1/logs/searchGET /api/v1/logs/stream— SSEGET /api/v1/logs/sources
Log-Alert-Regeln gibt es nicht mehr (weder UI noch API) — Log-Alarme laufen über Eventlog-/Script-Checks und normale Alert-Regeln.
Dashboards + Reports¶
GET /api/v1/dashboards/POST /api/v1/dashboards/GET /api/v1/services/{service_id}/slaGET /api/v1/tenants/{tenant_id}/sla-reportPOST /api/v1/reports/generate
Wiki + AI¶
GET /api/v1/wiki/articlesPOST /api/v1/wiki/articlesGET /api/v1/wiki/search?q=...POST /api/v1/ai/chatPOST /api/v1/ai/chat/stream— SSEPOST /api/v1/ai/analyze/{service_id}GET /api/v1/ai/statusPUT /api/v1/ai/configGET /api/v1/ai/modelsPOST /api/v1/ai/models/pullPOST /api/v1/ai/models/deletePOST /api/v1/ai/test-connection
Admin¶
POST /api/v1/admin/exportPOST /api/v1/admin/importGET /api/v1/admin/health/snapshotGET /api/v1/admin/license/status
Audit + Trash¶
GET /api/v1/audit-log/GET /api/v1/audit-log/exportGET /api/v1/trash/summaryPOST /api/v1/trash/{kind}/{id}/restoreDELETE /api/v1/trash/{kind}/{id}/purge
Push (Web Push)¶
GET /api/v1/push/vapid-public-keyPOST /api/v1/push/subscriptions— Browser-Abo des angemeldeten Benutzers anlegenGET /api/v1/push/subscriptions/mine·DELETE /api/v1/push/subscriptions/mine/{id}POST /api/v1/push/test
Die frühere native App und ihre push-tokens-Endpunkte sind entfernt.
Weitere¶
GET /api/v1/jump/search?q=— Schnellsuche (respektiert Tenant und Berechtigungen)GET/POST /api/v1/credential-sets— Zugangsdaten-Sets (Geheimnisse kommen nie zurück)POST /api/v1/scripts/declaration·POST /api/v1/scripts/resolve·GET /api/v1/scripts/{id}/usagePOST /api/v1/alert-rules/probe-alert— Probealarm durch die echte Kette- Listen unter
/alert-rules/und/notifications/nehmenq,limit,offsetund liefernX-Total-Count
Receiver (Agent / Collector)¶
POST /api/v1/receiver/check-resultPOST /api/v1/agent/heartbeatGET /api/v1/agent/configGET /api/v1/config/collector/{collector_id}
Antwort-Codes¶
| Code | Bedeutung |
|---|---|
| 200 / 201 / 204 | Erfolg |
| 400 | Validierungsfehler im Request-Body |
| 401 | Nicht authentifiziert oder Token abgelaufen |
| 403 | Authentifiziert, aber keine Permission |
| 404 | Resource nicht gefunden / nicht in deinem Tenant-Scope |
| 409 | Konflikt (z. B. Doppelter Hostname) |
| 422 | Validierung gescheitert (Pydantic-Detail im Body) |
| 429 | Rate-Limit |
| 500 | Server-Fehler (sollte nicht passieren — Issue öffnen) |
| 503 | Service Unavailable (z. B. Lizenz fehlt für Endpoint) |