import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/objects/application"
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/objects/application', 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/objects/application \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"applications": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"priced": true,
"unpriced_reason": "<string>",
"monthly_cents": 123,
"share_of_fleet_pct": 123,
"confidence": "<string>",
"coverage_incomplete": true,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"priced": true,
"monthly_cents": 123,
"confidence": "<string>",
"coverage_incomplete": true
}
],
"namespaces": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"monthly_cents": 123,
"shared": true
}
]
}
],
"fleet": {
"priced": true,
"monthly_cents": 123,
"applications_monthly_cents": 123,
"shared_monthly_cents": 123,
"outside_applications_monthly_cents": 123,
"unattributed_monthly_cents": 123,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"priced": true,
"monthly_cents": 123,
"namespaces_attributed": true,
"applications_monthly_cents": 123,
"outside_applications_monthly_cents": 123
}
]
},
"snapshot_stale_after_hours": 123
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}List applications' cost projections
Every application of the organisation with its cost projection in one call - the single application read’s figures without the trend and the waste - and the fleet’s run rate split into the namespaces applications run in (each once), the rest of the attributed clusters, and the clusters whose pass attributed no namespace. 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/objects/application"
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/objects/application', 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/objects/application \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"applications": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"priced": true,
"unpriced_reason": "<string>",
"monthly_cents": 123,
"share_of_fleet_pct": 123,
"confidence": "<string>",
"coverage_incomplete": true,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"priced": true,
"monthly_cents": 123,
"confidence": "<string>",
"coverage_incomplete": true
}
],
"namespaces": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"monthly_cents": 123,
"shared": true
}
]
}
],
"fleet": {
"priced": true,
"monthly_cents": 123,
"applications_monthly_cents": 123,
"shared_monthly_cents": 123,
"outside_applications_monthly_cents": 123,
"unattributed_monthly_cents": 123,
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"priced": true,
"monthly_cents": 123,
"namespaces_attributed": true,
"applications_monthly_cents": 123,
"outside_applications_monthly_cents": 123
}
]
},
"snapshot_stale_after_hours": 123
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"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
Every application of the organisation with its cost projection, read in one call, and the fleet's run rate split against them so the applications' sum can be labelled honestly. A namespace two applications share is counted whole under each entry; the fleet block counts it once and names the shared part.
The caller's display currency; every *_cents figure is in its minor units.
Show child attributes
Show child attributes
The fleet's run rate (the fleet summary's figure) split into the namespaces applications run in (each counted once), the rest of the clusters whose latest pass attributed namespaces (idle capacity, unattributed storage, network, control plane, namespaces no application runs in), and the clusters whose pass attributed no namespace. The three add up to monthly_cents exactly.
Show child attributes
Show child attributes
The window a snapshot counts in.