import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/savings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/cloud-cost/savings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/cloud-cost/savings \
--header 'Authorization: Bearer <token>'{
"analysed_cluster_count": 123,
"breakdowns": [
{
"best_recommendation_id": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"components": [
{
"key": "<string>",
"label": "<string>",
"monthly_cents": 123
}
],
"idle_monthly_cents": 123,
"monthly_cents": 123,
"provider": "<string>",
"top_namespaces": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cents": 123,
"namespace": "<string>",
"share_percent": 123
}
],
"trend": [
{
"day": "2023-11-07T05:31:56Z",
"monthly_cost_estimate_cents": 123
}
],
"unallocated_monthly_cents": 123
}
],
"currency": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"namespaces": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cents": 123,
"namespace": "<string>",
"share_percent": 123
}
],
"priced_cluster_count": 123,
"recommendations": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"environment": "<string>",
"evidence": {
"idle_monthly_cents": 123,
"off_hours_share_percent": 123,
"start_cron": "<string>",
"stop_cron": "<string>",
"stoppable_monthly_cents": 123,
"unallocated_monthly_cents": 123,
"unallocated_share_percent": 123
},
"id": "<string>",
"kind": "right_size_idle",
"monthly_cost_cents": 123,
"monthly_savings_cents": 123,
"provider": "<string>",
"share_percent": 123
}
],
"thresholds": {
"analysed_cluster_limit": 123,
"minimum_off_hours_monthly_cents": 123,
"minimum_savings_cents": 123,
"off_hours_share": 123,
"unallocated_share_threshold": 123
},
"total_monthly_savings_cents": 123,
"unanalysed_cluster_count": 123,
"unpriced_cluster_count": 123,
"unpriced_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"kind": "<string>"
}
],
"stale_cluster_count": 123,
"stale_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"kind": "<string>"
}
],
"unreadable_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>"
}
],
"waste": {
"available": true,
"finding_count": 123,
"has_data": true,
"scanned_at": "<string>",
"total_monthly_cost_cents": 123,
"unpriced_finding_count": 123
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Savings model for the organisation
The organisation’s savings model: right-size and off-hours recommendations across the biggest priced clusters, the cost breakdowns they were read from, the clusters the fleet cannot price, and the waste scan, in the caller’s display currency (ankra cost savings). One cluster counts once in the total, at its best lever. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/savings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/cloud-cost/savings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/cloud-cost/savings \
--header 'Authorization: Bearer <token>'{
"analysed_cluster_count": 123,
"breakdowns": [
{
"best_recommendation_id": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"components": [
{
"key": "<string>",
"label": "<string>",
"monthly_cents": 123
}
],
"idle_monthly_cents": 123,
"monthly_cents": 123,
"provider": "<string>",
"top_namespaces": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cents": 123,
"namespace": "<string>",
"share_percent": 123
}
],
"trend": [
{
"day": "2023-11-07T05:31:56Z",
"monthly_cost_estimate_cents": 123
}
],
"unallocated_monthly_cents": 123
}
],
"currency": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"namespaces": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cents": 123,
"namespace": "<string>",
"share_percent": 123
}
],
"priced_cluster_count": 123,
"recommendations": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"environment": "<string>",
"evidence": {
"idle_monthly_cents": 123,
"off_hours_share_percent": 123,
"start_cron": "<string>",
"stop_cron": "<string>",
"stoppable_monthly_cents": 123,
"unallocated_monthly_cents": 123,
"unallocated_share_percent": 123
},
"id": "<string>",
"kind": "right_size_idle",
"monthly_cost_cents": 123,
"monthly_savings_cents": 123,
"provider": "<string>",
"share_percent": 123
}
],
"thresholds": {
"analysed_cluster_limit": 123,
"minimum_off_hours_monthly_cents": 123,
"minimum_savings_cents": 123,
"off_hours_share": 123,
"unallocated_share_threshold": 123
},
"total_monthly_savings_cents": 123,
"unanalysed_cluster_count": 123,
"unpriced_cluster_count": 123,
"unpriced_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"kind": "<string>"
}
],
"stale_cluster_count": 123,
"stale_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"kind": "<string>"
}
],
"unreadable_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>"
}
],
"waste": {
"available": true,
"finding_count": 123,
"has_data": true,
"scanned_at": "<string>",
"total_monthly_cost_cents": 123,
"unpriced_finding_count": 123
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Response
Successful response
The organisation's savings model. total_monthly_savings_cents counts each cluster once, at its best lever, because idle spend sits inside what an off-hours stop reclaims; unanalysed clusters are priced clusters beyond the analysed limit, not clusters with nothing to save.
Show child attributes
Show child attributes
The costliest namespaces across the analysed clusters, at most twelve.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Clusters priced before whose latest snapshot is older than the fleet's staleness window: metering has stalled, which is neither priced nor unpriced.
Show child attributes
Show child attributes
Priced clusters whose cost breakdown could not be read on this pass; counted as unanalysed, never as clusters with nothing to save.
Show child attributes
Show child attributes
The open cloud-waste findings. available is false when the waste scan could not be read, which is unknown waste, not no waste.
Show child attributes
Show child attributes