Recommendations API
View, approve, and apply cost optimization recommendations.
List Recommendations
GET /api/v1/recommendations?status=pending&cluster_id={id}
{
"recommendations": [
{
"id": "rec_...",
"title": "Reduce CPU request for nginx-deployment",
"rule_id": "cpu_overprovisioned",
"category": "cpu_memory",
"severity": "medium",
"estimated_savings": 12.50,
"pod_name": "nginx-deployment-abc123",
"namespace": "production",
"status": "pending",
"recommended_spec": {
"cpu_request": "100m",
"memory_request": "128Mi"
}
}
]
}
Approve / Reject
POST /api/v1/recommendations/{id}/approve
POST /api/v1/recommendations/{id}/reject
Apply (Mark as Implemented)
POST /api/v1/recommendations/{id}/apply
Batch Operations
POST /api/v1/recommendations/batch
{
"action": "approve",
"ids": ["rec_1", "rec_2", "rec_3"]
}
Generate GitOps Manifest
POST /api/v1/gitops/manifests
{
"recommendation_ids": ["rec_1", "rec_2"],
"format": "strategic-merge"
}
Supported formats: json-patch, strategic-merge, helm, kustomize, yaml.