All endpoints are hosted under /api/* and require an authenticated Clerk session token passed via Authorization header or cookies.
- Description: Public health check endpoint.
- Response:
{ "status": "ok", "service": "cloud-cost-pulse" }
- Description: Returns 7 KPI cards, 7 dynamic Recharts series, forecast details, budget health, recommendations, and currency mode.
- Response:
{ "stats": { "totalMonthlyCost": 72470, "totalResources": 50, "activeResources": 36, "activeServices": 7, "totalServices": 7, "potentialSavings": 14500, "budgetUsage": 120.8, "growth": 7.7 }, "currency": "INR", "dataSource": "demo" }
- Description: Returns FinOps Business Intelligence breakdowns by Service, Region, Owner/Team, and Department.
- Parameters:
search,service,region,status,minCost,maxCost,page,pageSize - Response: Paginated resources list, total counts, page info, and filter facets.
- Description: Creates a new resource in the inventory.
- Payload:
{ "resource_name": "prod-vm-eastus-01", "service_type": "Azure Virtual Machine", "region": "East US", "monthly_cost": 4500, "status": "Active", "owner": "platform-team" }
- Description: Updates an existing resource by ID.
- Description: Deletes a resource by ID.
- Payload:
{ "action": "bulk_delete" | "bulk_status", "ids": ["id1", "id2"], "status": "Active" }
- Description: Batch parses and inserts cloud cost rows from CSV/Excel/JSON files.
- Payload:
{ "mode": "replace" | "merge" } - Description: Reseeds the 50-resource demo dataset.
- Description: Returns current monthly budget limits.
- Payload:
{ "monthly_budget": 60000 }
- Description: Returns active FinOps savings recommendations.
- Description: Applies recommendation action and updates resource status/cost.
- Description: Lists saved report snapshots.
- Payload:
{ "type": "Monthly Cost Report" }
- Payload:
{ "currency": "INR" | "USD" | "EUR" | "GBP" }
- Description: Downloads full JSON backup of the workspace state.