Authentication
API keys are the recommended way to authenticate programmatic access. See API Keys.
curl -H "Authorization: Bearer <API_KEY>" \
"https://<DASHBOARD_URL>/api/v1/workloads"API Specification
Examples
All Clusters — Cost Report
Use X-Scaleops-Cluster: "*" to fan out across all clusters:
curl -X POST "https://<DASHBOARD_URL>/detailedCostReport/getWorkloads?range=3d" \
-H "Authorization: Bearer <API_KEY>" \
-H 'X-Scaleops-Cluster: "*"' \
-H "Content-Type: application/json" \
-d '{"namespaces":["jenkins"],"workloadTypes":["Deployment"]}'Specific Cluster — Cost Report
Target a single cluster with the X-Scaleops-Cluster header:
curl -X POST "https://<DASHBOARD_URL>/detailedCostReport/getWorkloads?range=3d" \
-H "Authorization: Bearer <API_KEY>" \
-H "X-Scaleops-Cluster: <CLUSTER_NAME>" \
-H "Content-Type: application/json" \
-d '{"namespaces":["jenkins"]}'Multiple Specific Clusters
Pipe-separate cluster names in the header:
curl -X POST "https://<DASHBOARD_URL>/detailedCostReport/getWorkloads?range=3d" \
-H "Authorization: Bearer <API_KEY>" \
-H "X-Scaleops-Cluster: cluster-name1|cluster-name2" \
-H "Content-Type: application/json" \
-d '{"namespaces":["jenkins"]}'