Clear a project's cost autopilot tier
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/autopilot/projects/{project_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/projects/{project_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/projects/{project_id} \
--header 'Authorization: Bearer <token>'{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"defaults": {},
"set_by": "<string>",
"set_at": "2023-11-07T05:31:56Z"
}{
"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"
}Cost
Clear a project's cost autopilot tier
Returns a project’s clusters to the organisation’s defaults by removing the project’s own autopilot defaults (ADR 0022). Clearing a project that set none changes nothing and writes no audit row. The answer is the project with no layer: empty defaults, with set_by and set_at null. Needs billing.manage and clusters.write; the token stands in for the browser route’s CSRF double-submit. Bearer-PAT twin of the browser route of the same name under /org.
DELETE
/
api
/
v1
/
org
/
cloud-cost
/
autopilot
/
projects
/
{project_id}
Clear a project's cost autopilot tier
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/autopilot/projects/{project_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/projects/{project_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/projects/{project_id} \
--header 'Authorization: Bearer <token>'{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"defaults": {},
"set_by": "<string>",
"set_at": "2023-11-07T05:31:56Z"
}{
"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
Response
Successful response
A project's own autopilot defaults (ADR 0022): a layer between a cluster's override and the organisation's defaults.