API Reference
GraphQL primary API + REST endpoints for agents and webhooks.
Overview
| Endpoint | Protocol | Auth | Purpose |
|---|---|---|---|
/graphql | POST | JWT Bearer | Frontend API (queries, mutations) |
/graphql/ws | WebSocket | JWT | Real-time subscriptions |
/api/v1/operator/* | REST | API Key Bearer | Agent communication |
/api/v1/backup/report | REST POST | API Key Bearer | Backup webhook |
/api/v1/license/activate | REST POST | None | License activation |
Authentication
Frontend (JWT)
# Login
POST /graphql
{
"query": "mutation { login(email: \"user@example.com\", password: \"...\") { token refreshToken user { id email } } }"
}
# Use token
POST /graphql
Authorization: Bearer <jwt-token>
Content-Type: application/json
Agent (API Key)
Authorization: Bearer <operator-api-key>
GraphQL API
Key Queries
# SLA Groups with backup status
{
slaGroups {
id name displayName tier status currentUptime
services {
serviceName status replicas readyReplicas
backupStatus {
backupExpected lastBackupAt lastBackupStatus
backupMaxAgeDays backupOverdue
}
}
}
}
# Real-time snapshot trend (5-min buckets)
{
slaSnapshotTrend(serviceId: "uuid", hoursBack: 1) {
periodKey periodStart actualValue targetValue
incidentCount downtimeMinutes status
}
}
# SLA trend data (daily/monthly)
{
slaTrendData(filter: { periodType: "DAILY", monthsBack: 1 }) {
periodKey periodStart actualValue status
}
}
# Dashboard stats
{
slaDashboardStats {
totalServices servicesWithSla metCount
atRiskCount breachedCount averageUptime
}
}
Operator REST API
POST /api/v1/operator/status
Sync service statuses from agent. Called every 30 seconds.
{
"nodeId": "myorg/platform/prod/cluster1",
"operatorVersion": "1.0.0",
"services": [
{
"name": "my-api",
"status": "OPERATIONAL",
"replicas": 3,
"readyReplicas": 3,
"slaGroup": "payment-system",
"workloadType": "Deployment"
}
],
"slaGroups": [
{
"name": "payment-system",
"displayName": "Payment System",
"tier": "critical"
}
]
}
POST /api/v1/operator/heartbeat
{
"nodeId": "myorg/platform/prod/cluster1",
"version": "1.0.0",
"watchedServices": 7,
"healthyServices": 6,
"unhealthyServices": 1
}
POST /api/v1/operator/register
Register new service discovered from it-ops.yaml ConfigMap.
{
"name": "my-database",
"displayName": "My Database",
"nodeId": "myorg/platform/prod/cluster1",
"criticality": "critical",
"operations": {
"backup": {
"expected": true,
"maxAgeDays": 1
}
}
}
GET /api/v1/operator/services?nodeId=...
Returns expected services for the agent to monitor.
Backup Webhook
POST /api/v1/backup/report
# Service-level
{
"service": "my-database",
"status": "success", // success | failed | partial
"sizeBytes": 5242880,
"message": "pg_dump completed"
}
# SLA Group-level (propagates to member services)
{
"slaGroup": "payment-system",
"status": "success"
}
# Namespace-level
{
"namespace": "production",
"status": "success"
}
# Response
{
"success": true,
"message": "backup report recorded for 3 services",
"affected": 3,
"services": ["db-1", "db-2", "cache-1"]
}
License API
POST /api/v1/license/activate
{
"licenseKey": "eyJhbGciOiJFZERTQSIs..."
}
// Response
{
"success": true,
"message": "License activated",
"customer": "My Company",
"plugins": ["ticketing", "sla", "audit"]
}
WebSocket Subscriptions
Connect to /graphql/ws for real-time updates via GraphQL subscriptions.
# Events available:
- ticket:created, ticket:updated, ticket:deleted
- sla:alert, sla:incident
- license:updated
- service:status_changed