Get bastion health
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/bastion/health"
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/hetzner/{cluster_id}/bastion/health', 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/hetzner/{cluster_id}/bastion/health \
--header 'Authorization: Bearer <token>'{
"checked_at": "<string>",
"consecutive_failures": 123,
"detail": "<string>",
"diagnose_supported": true,
"hop": "bastion",
"kind": "<string>",
"provider": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "healthy",
"vm_status": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Hetzner Clusters
Get bastion health
Bearer PAT authentication; RBAC permission clusters.read. Reports the verdict the bastion_health maintenance loop last recorded for the cluster’s bastion or gateway host; it never probes the host itself.
GET
/
api
/
v1
/
clusters
/
hetzner
/
{cluster_id}
/
bastion
/
health
Get bastion health
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/bastion/health"
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/hetzner/{cluster_id}/bastion/health', 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/hetzner/{cluster_id}/bastion/health \
--header 'Authorization: Bearer <token>'{
"checked_at": "<string>",
"consecutive_failures": 123,
"detail": "<string>",
"diagnose_supported": true,
"hop": "bastion",
"kind": "<string>",
"provider": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "healthy",
"vm_status": "<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.
Path Parameters
Response
Successful response
Probe timestamp the maintenance loop stamped; empty until the first probe.
Failed probes in a row; the offline notification fires at three.
False for providers with no bastion diagnose job lane (Scaleway's managed Public Gateway).
Which hop the probe failed at.
Available options:
bastion, jumphost, Empty until the bastion has been probed once.
Available options:
healthy, offline, unknown, The provider's own view of the VM, read when SSH failed.