List the cost budgets (bearer twin)
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/budgets"
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/budgets', 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/budgets \
--header 'Authorization: Bearer <token>'{
"budgets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope_kind": "organisation",
"scope_id": "<string>",
"scope_name": "<string>",
"monthly_cents": 123,
"currency": "<string>",
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notify_at_pct": 123,
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"month": "<string>",
"projection": {
"status": "under",
"month_to_date_cents": 123,
"projected_month_end_cents": 123,
"percent_of_budget": 123,
"crossing_at": "2023-11-07T05:31:56Z",
"running_savings_monthly_cents": 123,
"after_running_changes_cents": 123,
"priced_cluster_count": 123,
"unpriced_cluster_count": 123,
"complete": true,
"currency": "<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
List the cost budgets (bearer twin)
Every budget of the organisation, largest first, each with its month as of the read: spent so far, the projected month end at the current pace, the hour it crosses, and where it lands once the changes already approved or running have landed. Figures are in the budget’s own currency; a scope with no priced cluster answers status unknown with null figures rather than zero. 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
/
budgets
List the cost budgets (bearer twin)
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/budgets"
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/budgets', 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/budgets \
--header 'Authorization: Bearer <token>'{
"budgets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope_kind": "organisation",
"scope_id": "<string>",
"scope_name": "<string>",
"monthly_cents": 123,
"currency": "<string>",
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notify_at_pct": 123,
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"month": "<string>",
"projection": {
"status": "under",
"month_to_date_cents": 123,
"projected_month_end_cents": 123,
"percent_of_budget": 123,
"crossing_at": "2023-11-07T05:31:56Z",
"running_savings_monthly_cents": 123,
"after_running_changes_cents": 123,
"priced_cluster_count": 123,
"unpriced_cluster_count": 123,
"complete": true,
"currency": "<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
The organisation's budgets, largest first.
Show child attributes
Show child attributes