Diagnose bastion
import requests
url = "https://platform.ankra.app/api/v1/clusters/upcloud/{cluster_id}/bastion/diagnose"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/upcloud/{cluster_id}/bastion/diagnose', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/upcloud/{cluster_id}/bastion/diagnose \
--header 'Authorization: Bearer <token>'{
"completed": true,
"health": {},
"job_name": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_excerpt": "<string>",
"report": {}
}{
"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"
}UpCloud Clusters
Diagnose bastion
Bearer PAT authentication; RBAC permission clusters.operate. Dispatches the read-only <provider>_bastion_diagnose job over SSH and waits for its report within a bounded budget; a slower job answers the operation ids to poll. Browser mutations require CSRF.
POST
/
api
/
v1
/
clusters
/
upcloud
/
{cluster_id}
/
bastion
/
diagnose
Diagnose bastion
import requests
url = "https://platform.ankra.app/api/v1/clusters/upcloud/{cluster_id}/bastion/diagnose"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/upcloud/{cluster_id}/bastion/diagnose', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/upcloud/{cluster_id}/bastion/diagnose \
--header 'Authorization: Bearer <token>'{
"completed": true,
"health": {},
"job_name": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_excerpt": "<string>",
"report": {}
}{
"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.
Path Parameters
Response
Successful response
False when the wait budget elapsed first; poll operation_id for the report.
The platform's own bastion health view (state, hop, detail) at dispatch time.
The diagnose job's structured snapshot and findings, present once it completed.