Discover managed clusters
import requests
url = "https://platform.ankra.app/api/v1/clusters/managed/{provider}/discover"
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/clusters/managed/{provider}/discover', 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/clusters/managed/{provider}/discover \
--header 'Authorization: Bearer <token>'{
"clusters": [
{
"already_imported": true,
"cni": "<string>",
"location": "<string>",
"name": "<string>",
"node_count": 123,
"node_pools": [
{
"autohealing": true,
"autoscaling": {
"max_count": 2,
"min_count": 2,
"enabled": true
},
"count": 1,
"labels": {},
"name": "<string>",
"provider_id": "<string>",
"public_ip": true,
"root_volume_size_gb": 2,
"root_volume_type": "<string>",
"security_group_id": "<string>",
"size": "<string>",
"status": "<string>",
"taints": [
{
"effect": "NoSchedule",
"key": "<string>",
"value": ""
}
],
"upgrade_policy": "<string>",
"zone": "<string>",
"spot": {
"enabled": true,
"max_price": 1
}
}
],
"ownership": "created",
"private_network_id": "<string>",
"provider_cluster_id": "<string>",
"status": "<string>",
"version": "<string>"
}
],
"incomplete": true,
"incomplete_regions": [
"<string>"
]
}{
"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"
}Managed Clusters
Discover managed clusters
Bearer PAT authentication; RBAC permission clusters.read. For Kapsule, provider_cluster_id is the opaque region-qualified regions/{region}/clusters/{id} reference. CNI is immutable. Imported/unknown provenance is disconnect-only; provider deletion is allowed by default only for created clusters.
GET
/
api
/
v1
/
clusters
/
managed
/
{provider}
/
discover
Discover managed clusters
import requests
url = "https://platform.ankra.app/api/v1/clusters/managed/{provider}/discover"
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/clusters/managed/{provider}/discover', 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/clusters/managed/{provider}/discover \
--header 'Authorization: Bearer <token>'{
"clusters": [
{
"already_imported": true,
"cni": "<string>",
"location": "<string>",
"name": "<string>",
"node_count": 123,
"node_pools": [
{
"autohealing": true,
"autoscaling": {
"max_count": 2,
"min_count": 2,
"enabled": true
},
"count": 1,
"labels": {},
"name": "<string>",
"provider_id": "<string>",
"public_ip": true,
"root_volume_size_gb": 2,
"root_volume_type": "<string>",
"security_group_id": "<string>",
"size": "<string>",
"status": "<string>",
"taints": [
{
"effect": "NoSchedule",
"key": "<string>",
"value": ""
}
],
"upgrade_policy": "<string>",
"zone": "<string>",
"spot": {
"enabled": true,
"max_price": 1
}
}
],
"ownership": "created",
"private_network_id": "<string>",
"provider_cluster_id": "<string>",
"status": "<string>",
"version": "<string>"
}
],
"incomplete": true,
"incomplete_regions": [
"<string>"
]
}{
"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
Available options:
doks, uks, gke, ovh_mks, aks, eks, kapsule Example:
"kapsule"