import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/waste/{finding_id}/resolve"
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/org/cloud-cost/waste/{finding_id}/resolve', 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/org/cloud-cost/waste/{finding_id}/resolve \
--header 'Authorization: Bearer <token>'{
"action": "snapshot_then_delete",
"kind": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"snapshot_retained_days": 123,
"waste_finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Clean up one cloud-waste finding
Starts the cleanup of one open cloud-waste finding and answers the operation that does it (ankra cost waste resolve). What happens is decided by the kind of waste, never by the caller: a stopped server gets a snapshot image kept for seven days and is deleted only once the image is available; an unassigned IP or an idle load balancer is released. An unattached volume is refused (the provider offers no volume snapshot, so its data could not be kept) and so is a released persistent volume (its cluster reclaims it). Needs billing.manage. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/waste/{finding_id}/resolve"
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/org/cloud-cost/waste/{finding_id}/resolve', 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/org/cloud-cost/waste/{finding_id}/resolve \
--header 'Authorization: Bearer <token>'{
"action": "snapshot_then_delete",
"kind": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"snapshot_retained_days": 123,
"waste_finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Response
The cleanup operation was created
The cleanup operation and what it will do. snapshot_retained_days is set only for a snapshot-then-delete.