import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate"
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/clusters/{cluster_id}/cost/estimate', 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/clusters/{cluster_id}/cost/estimate \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123
},
"baseline": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"estimate": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"metered_monthly_cents": 123,
"predicted_monthly_cents": 123,
"delta_monthly_cents": 123,
"target_provider": "<string>",
"target_pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123
},
"available_targets": [
{
"provider": "<string>",
"title": "<string>",
"size_count": 123
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Price a cluster's current configuration for a what-if draft (bearer twin)
Prices what the cluster runs today - its node groups (from the machines Ankra provisioned, or the synced nodes grouped by pool) and load balancers - from the same price book or rate card the metering loop bills from, in the caller’s display currency. The estimate echoes the baseline so a draft can start from it. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate"
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/clusters/{cluster_id}/cost/estimate', 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/clusters/{cluster_id}/cost/estimate \
--header 'Authorization: Bearer <token>'{
"currency": "<string>",
"pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123
},
"baseline": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"estimate": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"metered_monthly_cents": 123,
"predicted_monthly_cents": 123,
"delta_monthly_cents": 123,
"target_provider": "<string>",
"target_pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123
},
"available_targets": [
{
"provider": "<string>",
"title": "<string>",
"size_count": 123
}
]
}{
"detail": "Cluster not found"
}{
"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.
Path Parameters
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The provider the estimate was priced on when the draft asked for a migration; empty otherwise.
The migration target's source and unit prices; pricing keeps the cluster's own.
Show child attributes
Show child attributes
Providers a draft may be priced on: those with an offline size catalogue and priced rows, the cluster's own excluded.
Show child attributes
Show child attributes