Delete a cluster stack
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}"
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/clusters/imported/{cluster_id}/stacks/{stack_name}', 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/clusters/imported/{cluster_id}/stacks/{stack_name} \
--header 'Authorization: Bearer <token>'{
"marked_for_deletion_at": "2023-11-07T05:31:56Z",
"commit_sha": "<string>",
"commit_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Imported Clusters
Delete a cluster stack
Marks the stack for deletion so its resources are removed from the cluster, and commits the change to the cluster’s GitOps repository when one is connected. Returns when the stack was marked and the commit; on a sandbox cluster the removal is simulated and settled before the response. A stack a managed service owns is refused with 409 until the service is retired. Requires stacks.delete on the cluster; a caller without it is refused with 403.
DELETE
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
stacks
/
{stack_name}
Delete a cluster stack
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/{stack_name}"
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/clusters/imported/{cluster_id}/stacks/{stack_name}', 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/clusters/imported/{cluster_id}/stacks/{stack_name} \
--header 'Authorization: Bearer <token>'{
"marked_for_deletion_at": "2023-11-07T05:31:56Z",
"commit_sha": "<string>",
"commit_url": "<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.