Base URL
Authentication
All API requests require authentication via one of:- API Key:
X-API-Key: cg_your_keyheader (for agents and CI/CD) - Bearer Token:
Authorization: Bearer TOKENheader (for dashboard/user sessions)
Endpoints
Agent Endpoints (API Key required)
| Method | Path | Description |
|---|---|---|
| POST | /ingest | Push cluster snapshot |
| POST | /ingest/logs | Push pod logs |
| POST | /api/validate | Validate a deployment (CI/CD) |
| POST | /api/argo/discover | Register ArgoCD instance |
Dashboard Endpoints (Bearer Token required)
| Method | Path | Description |
|---|---|---|
| GET | /api/clusters | List clusters |
| GET | /api/cluster?id=X | Get cluster snapshot |
| GET | /api/score-history?clusterId=X | Score history |
| GET | /api/export?clusterId=X&format=csv | Export report |
| GET | /api/audit | Audit trail |
| GET | /api/correlations | Cross-cluster risks |
| GET | /api/argo/instances | ArgoCD instances |
| GET | /api/argo/applications | ArgoCD applications |
| GET | /api/keys | List API keys |
| POST | /api/keys | Create API key |
Public Endpoints (No auth)
| Method | Path | Description |
|---|---|---|
| GET | /health | Backend health check |
| POST | /api/auth/login | Login |
| POST | /api/auth/signup | Create account |
| POST | /api/auth/verify | Verify token |
| POST | /api/auth/refresh | Refresh token |