Get the organisation's fleet cost rollup (bearer twin)
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>"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Cost
Get the organisation's fleet cost rollup (bearer twin)
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.
GET
/
api
/
v1
/
org
/
cloud-cost
/
summary
Get the organisation's fleet cost rollup (bearer twin)
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>"
}
]
}{
"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