import requests
url = "https://platform.ankra.app/api/v1/credentials/ovh/{credential_id}/capacity"
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/credentials/ovh/{credential_id}/capacity', 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/credentials/ovh/{credential_id}/capacity \
--header 'Authorization: Bearer <token>'{
"provider": "azure",
"measurement_version": 1,
"hetzner": {
"servers": {
"count": 123,
"running": 123,
"cores": 123,
"memory_gb": 123,
"disk_gb": 123
},
"volumes": {
"count": 123,
"total_gb": 123
},
"load_balancers": 123,
"floating_ips": 123,
"primary_ips": 123,
"networks": 123,
"firewalls": 123,
"ssh_keys": 123
},
"proxmox": {
"nodes": [
{
"node": "<string>",
"status": "<string>",
"cpu_cores": 123,
"cpu_used_fraction": 123,
"memory_total_bytes": 123,
"memory_used_bytes": 123,
"root_disk_total_bytes": 123,
"root_disk_used_bytes": 123,
"uptime_seconds": 123
}
],
"storages": [
{
"storage": "<string>",
"type": "<string>",
"shared": true,
"total_bytes": 123,
"used_bytes": 123,
"node": "<string>"
}
],
"guests": {
"count": 123,
"running": 123,
"templates": 123,
"allocated_cpu_cores": 123,
"allocated_memory_bytes": 123
},
"totals": {
"nodes": 123,
"online_nodes": 123,
"cpu_cores": 123,
"memory_total_bytes": 123,
"memory_used_bytes": 123,
"storage_total_bytes": 123,
"storage_used_bytes": 123
}
},
"upcloud": {
"credits": 123,
"limits": {
"cores": 123,
"memory_mb": 123,
"storage_ssd_gb": 123,
"storage_hdd_gb": 123,
"public_ipv4": 123,
"public_ipv6": 123,
"networks": 123,
"load_balancers": 123,
"detached_floating_ips": 123
},
"servers": {
"count": 123,
"running": 123,
"cores": 123,
"memory_mb": 123
},
"storages": {
"count": 123,
"total_gb": 123
}
},
"digitalocean": {
"account_status": "<string>",
"limits": {
"droplets": 123,
"floating_ips": 123,
"reserved_ips": 123
},
"droplets": {
"count": 123,
"running": 123,
"vcpus": 123,
"memory_mb": 123,
"disk_gb": 123
},
"volumes": {
"count": 123,
"total_gb": 123
},
"load_balancers": 123,
"floating_ips": 123
},
"ovh": {
"regions": [
{
"region": "<string>",
"instances_used": 123,
"instances_limit": 123,
"cores_used": 123,
"cores_limit": 123,
"ram_used_mb": 123,
"ram_limit_mb": 123,
"volume_used_gb": 123,
"volume_limit_gb": 123,
"volume_count": 123,
"load_balancers_used": 123,
"load_balancers_limit": 123
}
],
"totals": {
"instances_used": 123,
"instances_limit": 123,
"cores_used": 123,
"cores_limit": 123,
"ram_used_mb": 123,
"ram_limit_mb": 123,
"volume_used_gb": 123,
"volume_limit_gb": 123
}
},
"scaleway": {
"zones": [
{
"zone": "<string>",
"servers": 123,
"running": 123,
"cores": 123,
"ram_bytes": 123
}
],
"servers": 123,
"running": 123,
"cores": 123,
"ram_bytes": 123,
"storage_gb": 123,
"load_balancers": 123
},
"morpheus": {
"clouds": [
{
"id": 123,
"name": "<string>",
"memory_used_bytes": 123,
"memory_total_bytes": 123,
"storage_used_bytes": 123,
"storage_total_bytes": 123,
"cpu_used_percent": 123
}
],
"totals": {
"memory_used_bytes": 123,
"memory_total_bytes": 123,
"storage_used_bytes": 123,
"storage_total_bytes": 123
},
"instances": 123,
"hosts": 123
},
"azure": {
"virtual_machines": 123,
"aks_clusters": 123,
"regions": [
{
"location": "<string>",
"virtual_machines": 123,
"cores_used": 123,
"cores_limit": 123,
"virtual_machines_used": 123,
"virtual_machines_limit": 123
}
]
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Get OVH credential capacity
Reads the capacity and usage the OVH API exposes for this credential, live from the provider. Pass measurement_version=1 to receive the versioned contract, which keeps measurements the provider did not report as null; without it the response omits measurement_version and projects unknown OVH and HPE Morpheus measurements as 0 for older clients. Any other measurement_version answers 400. A credential of another provider or organisation answers 404; a provider API that refuses the read answers 400 with the provider’s detail.
This is the API-token route. It requires credentials.read in the organisation, and a token’s scopes narrow it.
import requests
url = "https://platform.ankra.app/api/v1/credentials/ovh/{credential_id}/capacity"
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/credentials/ovh/{credential_id}/capacity', 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/credentials/ovh/{credential_id}/capacity \
--header 'Authorization: Bearer <token>'{
"provider": "azure",
"measurement_version": 1,
"hetzner": {
"servers": {
"count": 123,
"running": 123,
"cores": 123,
"memory_gb": 123,
"disk_gb": 123
},
"volumes": {
"count": 123,
"total_gb": 123
},
"load_balancers": 123,
"floating_ips": 123,
"primary_ips": 123,
"networks": 123,
"firewalls": 123,
"ssh_keys": 123
},
"proxmox": {
"nodes": [
{
"node": "<string>",
"status": "<string>",
"cpu_cores": 123,
"cpu_used_fraction": 123,
"memory_total_bytes": 123,
"memory_used_bytes": 123,
"root_disk_total_bytes": 123,
"root_disk_used_bytes": 123,
"uptime_seconds": 123
}
],
"storages": [
{
"storage": "<string>",
"type": "<string>",
"shared": true,
"total_bytes": 123,
"used_bytes": 123,
"node": "<string>"
}
],
"guests": {
"count": 123,
"running": 123,
"templates": 123,
"allocated_cpu_cores": 123,
"allocated_memory_bytes": 123
},
"totals": {
"nodes": 123,
"online_nodes": 123,
"cpu_cores": 123,
"memory_total_bytes": 123,
"memory_used_bytes": 123,
"storage_total_bytes": 123,
"storage_used_bytes": 123
}
},
"upcloud": {
"credits": 123,
"limits": {
"cores": 123,
"memory_mb": 123,
"storage_ssd_gb": 123,
"storage_hdd_gb": 123,
"public_ipv4": 123,
"public_ipv6": 123,
"networks": 123,
"load_balancers": 123,
"detached_floating_ips": 123
},
"servers": {
"count": 123,
"running": 123,
"cores": 123,
"memory_mb": 123
},
"storages": {
"count": 123,
"total_gb": 123
}
},
"digitalocean": {
"account_status": "<string>",
"limits": {
"droplets": 123,
"floating_ips": 123,
"reserved_ips": 123
},
"droplets": {
"count": 123,
"running": 123,
"vcpus": 123,
"memory_mb": 123,
"disk_gb": 123
},
"volumes": {
"count": 123,
"total_gb": 123
},
"load_balancers": 123,
"floating_ips": 123
},
"ovh": {
"regions": [
{
"region": "<string>",
"instances_used": 123,
"instances_limit": 123,
"cores_used": 123,
"cores_limit": 123,
"ram_used_mb": 123,
"ram_limit_mb": 123,
"volume_used_gb": 123,
"volume_limit_gb": 123,
"volume_count": 123,
"load_balancers_used": 123,
"load_balancers_limit": 123
}
],
"totals": {
"instances_used": 123,
"instances_limit": 123,
"cores_used": 123,
"cores_limit": 123,
"ram_used_mb": 123,
"ram_limit_mb": 123,
"volume_used_gb": 123,
"volume_limit_gb": 123
}
},
"scaleway": {
"zones": [
{
"zone": "<string>",
"servers": 123,
"running": 123,
"cores": 123,
"ram_bytes": 123
}
],
"servers": 123,
"running": 123,
"cores": 123,
"ram_bytes": 123,
"storage_gb": 123,
"load_balancers": 123
},
"morpheus": {
"clouds": [
{
"id": 123,
"name": "<string>",
"memory_used_bytes": 123,
"memory_total_bytes": 123,
"storage_used_bytes": 123,
"storage_total_bytes": 123,
"cpu_used_percent": 123
}
],
"totals": {
"memory_used_bytes": 123,
"memory_total_bytes": 123,
"storage_used_bytes": 123,
"storage_total_bytes": 123
},
"instances": 123,
"hosts": 123
},
"azure": {
"virtual_machines": 123,
"aks_clusters": 123,
"regions": [
{
"location": "<string>",
"virtual_machines": 123,
"cores_used": 123,
"cores_limit": 123,
"virtual_machines_used": 123,
"virtual_machines_limit": 123
}
]
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Query Parameters
Response
Capacity and usage report
The provider-tagged capacity and usage report of a cloud credential (GET /org/credentials/{provider}/{credential_id}/capacity). Exactly one provider member is set, named by provider. Each provider reports what its API exposes: Hetzner and Scaleway report usage only, Proxmox VE reports the cluster's node and storage totals, UpCloud and DigitalOcean report account limits next to usage, OVH and HPE Morpheus report measurements that may be unknown. measurement_version is present only on responses requested with measurement_version=1; unversioned responses omit it and project unknown OVH and Morpheus measurements as 0.