Split metered vCPU by project
import requests
url = "https://platform.ankra.app/api/v1/org/billing/analytics/by-project"
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/billing/analytics/by-project', 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/billing/analytics/by-project \
--header 'Authorization: Bearer <token>'{
"window_hours": 123,
"total_worker_vcpu_hours": 123,
"unattributed_worker_vcpu_hours": 123,
"unattributed_cluster_count": 123,
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"cluster_count": 123,
"current_worker_vcpu": 123,
"worker_vcpu_hours": 123,
"share_pct": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Billing
Split metered vCPU by project
Returns each project’s share of the organisation’s metered worker vCPU hours over the window, with the unattributed remainder reported apart. Billing stays organisation-wide; this is the showback. Requires billing.read.
GET
/
api
/
v1
/
org
/
billing
/
analytics
/
by-project
Split metered vCPU by project
import requests
url = "https://platform.ankra.app/api/v1/org/billing/analytics/by-project"
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/billing/analytics/by-project', 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/billing/analytics/by-project \
--header 'Authorization: Bearer <token>'{
"window_hours": 123,
"total_worker_vcpu_hours": 123,
"unattributed_worker_vcpu_hours": 123,
"unattributed_cluster_count": 123,
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"cluster_count": 123,
"current_worker_vcpu": 123,
"worker_vcpu_hours": 123,
"share_pct": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Window length in hours.
Required range:
1 <= x <= 8760