import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/waste/resolve-batch"
payload = { "finding_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({finding_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://platform.ankra.app/api/v1/org/cloud-cost/waste/resolve-batch', 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/resolve-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"finding_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'{
"results": [
{
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "started",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"detail": "<string>",
"action": "snapshot_then_delete"
}
],
"started": 123,
"refused": 123,
"failed": 123,
"partial": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"results": [
{
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "started",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"detail": "<string>",
"action": "snapshot_then_delete"
}
],
"started": 123,
"refused": 123,
"failed": 123,
"partial": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clean up a batch of cloud waste
Starts the cleanup of up to 100 cloud-waste findings at once, one operation per finding, and answers each finding’s outcome: started with its operation, refused with the platform’s own reason (resolved already, a cleanup running, no consent, not old enough, a kind Ankra does not remove), or failed when the cleanup could not be started. Each finding is decided exactly as the single resolve route decides it; the written consent and minimum age apply to every finding that needs them. Answers 200 when at least one started (partial: true when not all did) and 409, with the same results, when none did. 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/resolve-batch"
payload = { "finding_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({finding_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://platform.ankra.app/api/v1/org/cloud-cost/waste/resolve-batch', 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/resolve-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"finding_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'{
"results": [
{
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "started",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"detail": "<string>",
"action": "snapshot_then_delete"
}
],
"started": 123,
"refused": 123,
"failed": 123,
"partial": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"results": [
{
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "started",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"detail": "<string>",
"action": "snapshot_then_delete"
}
],
"started": 123,
"refused": 123,
"failed": 123,
"partial": true
}{
"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.
Body
1 - 100 elementsThe written acknowledgement that no snapshot exists, needed by the kinds that keep no copy (unattached_volume).
no_snapshot_acknowledged The age a volume must have been seen unattached; at least 30, a smaller value is raised to 30.
0 <= x <= 3650