Skip to main content

Push Snapshot

POST /ingest
X-API-Key: cg_your_key
X-Cluster-Id: my-cluster
Content-Type: application/json
Content-Encoding: gzip
The agent sends a gzip-compressed JSON payload containing the full cluster state. The backend decompresses, calculates the CSC score, stores the snapshot, persists score history, and evaluates alert rules. Response:
{ "status": "ok" }

Push Logs

POST /ingest/logs
X-API-Key: cg_your_key
X-Cluster-Id: my-cluster
Content-Type: application/json
{
  "namespace": "default",
  "pod": "api-server-abc123",
  "container": "api",
  "lines": [
    { "timestamp": "2026-03-16T12:00:00Z", "message": "Request processed", "level": "INFO" }
  ]
}

Validate Deployment (CI/CD)

POST /api/validate
X-API-Key: cg_your_key (scope: cicd)
Content-Type: application/json
{
  "cluster_id": "production",
  "resource": "deployment/api-server",
  "namespace": "default",
  "action": "image_update",
  "image": "myapp:v2.1.0",
  "user": "ci-pipeline",
  "source": "github-actions"
}
Response:
{
  "decision": "SAFE",
  "csc_score": 87,
  "risks": [],
  "message": "Deployment validated successfully"
}
Decisions: SAFE (score ≥ 70), WARN (score 50-69), BLOCK (score < 50).