import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/autopilot/clusters/{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/org/cloud-cost/autopilot/clusters/{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/org/cloud-cost/autopilot/clusters/{cluster_id} \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"environment": "<string>",
"environment_kind": "production",
"override": {
"expires_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"set_at": "2023-11-07T05:31:56Z",
"set_by": "<string>",
"tier": "hands-off"
},
"reason": "<string>",
"source": "override",
"tier": "hands-off"
}{
"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"
}Clear a cluster's cost autopilot tier (bearer twin)
Returns one cluster to its environment’s default tier. Clearing a cluster with no override changes nothing and writes no audit row. The answer is the cluster’s tier as it now stands. Needs billing.manage and clusters.write (at the cluster); the token stands in for the browser route’s CSRF double-submit. The change and what it replaced are written to the audit log in the same transaction. Bearer-PAT twin of the browser route of the same name under /org; the console’s session cookie is not accepted here and the browser route answers a token with a login redirect.
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/autopilot/clusters/{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/org/cloud-cost/autopilot/clusters/{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/org/cloud-cost/autopilot/clusters/{cluster_id} \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"environment": "<string>",
"environment_kind": "production",
"override": {
"expires_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"set_at": "2023-11-07T05:31:56Z",
"set_by": "<string>",
"tier": "hands-off"
},
"reason": "<string>",
"source": "override",
"tier": "hands-off"
}{
"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
The cluster whose tier to set or clear.
Response
Successful response
A live cluster's cost autopilot tier and why: one row of the Autopilot view's table.
The cluster's environment label as stored.
The kind the label maps to; an empty or unrecognised label is unknown.
production, staging, development, preview, unknown The override that set the tier; null when the environment did.
Show child attributes
Show child attributes
The sentence a card shows, for example 'eu-production is Hands-off as a production cluster, so every change waits for a person.'
What set the tier.
override, environment hands-off, scheduled, managed, ephemeral