import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/events"
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/events', 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/events \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"days": 123,
"events": [
{
"at": "2023-11-07T05:31:56Z",
"day": "2023-12-25",
"kind": "application_release",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"subject": "<string>",
"actor": "<string>",
"delta_monthly_cents": 123,
"window_delta_monthly_cents": 123,
"delta_status": "isolated",
"note": "<string>"
}
],
"truncated": true,
"sources": [
{
"kind": "<string>",
"available": true
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Every move on the cost line, named by what happened
The events that moved the organisation’s cost run rate over the last days UTC days (ankra cost events), newest first, in the caller’s display currency: application releases (version changes in the clusters’ resource graphs), node-count changes between adjacent priced hours, scheduled and manual stops and starts, executed cost decisions, clusters entering or leaving pricing, and resolved cloud waste. A snapshot-measured event carries window_delta_monthly_cents, how the cluster’s run rate moved between the priced hour before it and the first priced hour at least 30 minutes after it; delta_monthly_cents is set only when the event was alone in that window (delta_status isolated). Events sharing a window are shared: each carries the window’s move and none claims a share of it. no_snapshots means no priced hour on one side, so the move is unknown, never zero. A coverage event’s delta is coverage, not spend; a resolved finding’s is its own monthly cost (own_cost), or unknown (unpriced). sources says which kinds could be read; a kind marked unavailable is missing from events, not quiet. At most 500 events (truncated). 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/events"
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/events', 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/events \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"days": 123,
"events": [
{
"at": "2023-11-07T05:31:56Z",
"day": "2023-12-25",
"kind": "application_release",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"subject": "<string>",
"actor": "<string>",
"delta_monthly_cents": 123,
"window_delta_monthly_cents": 123,
"delta_status": "isolated",
"note": "<string>"
}
],
"truncated": true,
"sources": [
{
"kind": "<string>",
"available": true
}
]
}{
"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
Every move on the cost line, named by what happened (ankra-cozgu.1.7.3).
Newest first.
Show child attributes
Show child attributes
More than 500 events; the newest 500 are served.
Which kinds of event could be read; an unavailable kind is missing from events, not quiet.
Show child attributes
Show child attributes