import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id} \
--header 'Authorization: Bearer <token>'{
"cluster_id": "<string>",
"operation_id": "<string>",
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Deprovision a Hetzner cluster
Deletes the cluster and its cloud resources. A delete that would remove persistent volumes, or cannot tell whether it does, is refused with 409 unless accept_volume_data_loss=true is passed (see the deprovision-volumes read); force=true tolerates infrastructure that can no longer be reached. Active operations on the cluster are cancelled and the response carries the teardown’s operation_id.
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id} \
--header 'Authorization: Bearer <token>'{
"cluster_id": "<string>",
"operation_id": "<string>",
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Set to 'true' to force deprovision without waiting for the cluster agent. Use only when the cluster agent is permanently offline; cloud resources may leak if Vault or the agent cannot be reached during teardown.
Set to 'true' to accept that the cluster's persistent volumes - the cloud volumes its CSI driver provisioned - and the data on them are deleted with the cluster, unless its retention_policy retains them. GET .../deprovision-volumes lists them. Required, forced or not, when the delete removes volumes or cannot tell whether it does: without it the delete answers 409 naming them.