import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{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/digitalocean/{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/digitalocean/{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>",
"connect_failed_since": "<string>",
"restart_withheld": {
"flap_count": 123,
"reason": "flapping",
"since": "2023-11-07T05:31:56Z",
"summary": "<string>"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}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.
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{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/digitalocean/{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/digitalocean/{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>",
"connect_failed_since": "<string>",
"restart_withheld": {
"flap_count": 123,
"reason": "flapping",
"since": "2023-11-07T05:31:56Z",
"summary": "<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.
bastion, jumphost, Empty until the bastion has been probed once.
healthy, offline, unknown, The provider's own view of the VM, read when SSH failed.
When the current unbroken run of failed TCP connects to the bastion began. Omitted when the bastion is not proven dark: it still answers TCP, or it is healthy.
Present only while the platform is deliberately not restarting the bastion automatically. A bastion that keeps recovering and failing again is flapping, and restarts are withheld until it has refused the TCP connect for one unbroken hour. Omitted otherwise.
Show child attributes
Show child attributes