import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}/uninstall"
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/clusters/imported/{cluster_id}/stacks/{stack_name}/uninstall', 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/clusters/imported/{cluster_id}/stacks/{stack_name}/uninstall \
--header 'Authorization: Bearer <token>'{
"stack_name": "<string>",
"installed": true,
"resource_ids": [
"<string>"
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Uninstall a cluster stack
Takes every add-on, manifest and application of the stack off the cluster while the stack stays declared in Ankra and in Git, so POST .../install can bring it back later. Nothing is committed to Git. Members are removed in reverse dependency order, and data is treated exactly as a delete treats it: what a chart or operator removes with its workload is removed too, so back up the stack first (GET .../data-assets lists what it stores). While the stack is uninstalled its members stay off the cluster through cluster starts and Git syncs, and edits to them are stored and deployed on install. Until the uninstall has finished removing a member, a write that would change what that removal deletes - the member’s own definition, the stack it is in, or that stack’s variables or name it renders with - is refused with 409 STACK_UNINSTALL_IN_PROGRESS. Requires stacks.delete on the cluster; a caller without it is refused with 403.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}/uninstall"
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/clusters/imported/{cluster_id}/stacks/{stack_name}/uninstall', 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/clusters/imported/{cluster_id}/stacks/{stack_name}/uninstall \
--header 'Authorization: Bearer <token>'{
"stack_name": "<string>",
"installed": true,
"resource_ids": [
"<string>"
]
}{
"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.
Response
Successful Response
A stack uninstall's or install's outcome.