import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/summary"
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/summary', 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/summary \
--header 'Authorization: Bearer <token>'{
"by_credential": [
{
"cluster_count": 123,
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"by_provider": [
{
"cluster_count": 123,
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"cluster_count": 123,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"confidence_level": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"currency": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"top_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"confidence_level": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"generated_at": "2023-11-07T05:31:56Z",
"unmetered_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"is_deleted": true,
"last_snapshot_at": "2023-11-07T05:31:56Z",
"month_to_date_cents": 123,
"provider": "<string>"
}
],
"unmetered_month_to_date_cents": 123
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Get the organisation's fleet cost rollup
Every cluster whose latest snapshot is inside the staleness window, grouped by provider and by provisioning credential, in the caller’s display currency (ankra cost summary). Bearer-PAT twin of the browser route of the same name under /org; the console’s session cookie is not accepted here and the browser route answers a token with a login redirect.
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/summary"
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/summary', 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/summary \
--header 'Authorization: Bearer <token>'{
"by_credential": [
{
"cluster_count": 123,
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"by_provider": [
{
"cluster_count": 123,
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"cluster_count": 123,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"confidence_level": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"currency": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"top_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"confidence_level": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"month_to_date_cents": 123,
"monthly_cost_estimate_cents": 123,
"projected_month_end_cents": 123,
"provider": "<string>"
}
],
"generated_at": "2023-11-07T05:31:56Z",
"unmetered_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"is_deleted": true,
"last_snapshot_at": "2023-11-07T05:31:56Z",
"month_to_date_cents": 123,
"provider": "<string>"
}
],
"unmetered_month_to_date_cents": 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
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
When the newest cost snapshot behind these figures was computed (RFC 3339, UTC), so a reader can say how fresh they are rather than when it asked. Null when no cluster has a snapshot in the window.
The clusters in scope that spent money this month but carry no fresh snapshot: deleted this month, or with metering that has stalled. What they spent is part of month_to_date_cents and projected_month_end_cents; they add no pace and are not in clusters, cluster_count or the buckets.
Show child attributes
Show child attributes
What the unmetered clusters spent this month, in the display currency. The buckets plus this figure reconcile to month_to_date_cents.