import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/trend"
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/trend', 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/trend \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"days": 123,
"points": [
{
"day": "2023-12-25",
"monthly_cost_estimate_cents": 123,
"priced_cluster_count": 123,
"fully_priced_cluster_count": 123,
"current": true
}
],
"coverage_changes": [
{
"day": "2023-12-25",
"priced_cluster_count_before": 123,
"priced_cluster_count_after": 123,
"entered": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cost_estimate_cents": 123
}
],
"left": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cost_estimate_cents": 123
}
],
"coverage_delta_monthly_cents": 123
}
],
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"deleted": true,
"first_priced_at": "2023-11-07T05:31:56Z",
"first_priced_exact": true,
"first_day": "2023-12-25",
"last_day": "2023-12-25",
"priced_days": 123
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}The fleet's run rate per day, with coverage drawn apart from spend
The organisation’s cost run rate per UTC day over every priced cluster (ankra cost trend), in the caller’s display currency. A cost snapshot exists only for an hour a cluster was priced, so a cluster missing from a day was not priced that day - it did not cost nothing. Each point says how many clusters it covers (priced_cluster_count, and fully_priced_cluster_count for those whose run rate is the whole cost, not a floor), and a day no cluster was priced has a null run rate. coverage_changes lists every day the set of priced clusters changed, naming the clusters that entered and left and what that moved the line by: a coverage move, never a spend move. The last point (current) is the summary’s own run rate - each cluster’s latest snapshot within 26 hours, deleted clusters out - so the line ends where GET /api/v1/org/cloud-cost/summary does; earlier points are each cluster’s last snapshot of the day. clusters carries each priced cluster’s span over the window and when it was first priced (first_priced_exact false means the earliest priced hour still known, not necessarily the first). 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/trend"
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/trend', 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/trend \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"days": 123,
"points": [
{
"day": "2023-12-25",
"monthly_cost_estimate_cents": 123,
"priced_cluster_count": 123,
"fully_priced_cluster_count": 123,
"current": true
}
],
"coverage_changes": [
{
"day": "2023-12-25",
"priced_cluster_count_before": 123,
"priced_cluster_count_after": 123,
"entered": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cost_estimate_cents": 123
}
],
"left": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"monthly_cost_estimate_cents": 123
}
],
"coverage_delta_monthly_cents": 123
}
],
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"deleted": true,
"first_priced_at": "2023-11-07T05:31:56Z",
"first_priced_exact": true,
"first_day": "2023-12-25",
"last_day": "2023-12-25",
"priced_days": 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.
Query Parameters
How many UTC days the trend covers, ending today (1..34: the cost snapshots are kept 35 days).
1 <= x <= 34Response
Successful response
The fleet's run rate per day with the coverage drawn apart from the spend (ankra-cozgu.1.7).
Every day of the window, oldest first; the last is the current run rate.
Show child attributes
Show child attributes
The days the set of priced clusters changed, oldest first.
Show child attributes
Show child attributes
Every cluster priced on at least one day of the window.
Show child attributes
Show child attributes