import requests
url = "https://platform.ankra.app/org/applications/{application_id}/deployments/remove"
payload = { "cluster_id": "<string>" }
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({cluster_id: '<string>'})
};
fetch('https://platform.ankra.app/org/applications/{application_id}/deployments/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/applications/{application_id}/deployments/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_id": "<string>"
}
'{
"cluster_id": "<string>",
"namespace": "<string>",
"operation_id": "<string>",
"status": "<string>",
"installation_id": "<string>",
"stack_name": "<string>",
"retained_stacks": [
"<string>"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Remove an application deployment from one cluster (browser session)
Remove one deployment of this application: take it off one cluster and namespace while the application and its other deployments stay. The installation is marked removing and the same undeploy job an application delete enqueues per installation is enqueued for it; the job removes the deploy stack it can prove belongs to this application (shared operators are kept) and deletes the installation once the cluster has it. The application, its env secrets, images and pipeline history are kept. While the removal runs, a deploy to the same cluster and namespace is refused with 409. Held to the applications.deploy permission. Browser session authentication with the X-Ankra-CSRF double-submit header; the bearer twin is POST /api/v1/org/applications//deployments/remove.
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/deployments/remove"
payload = { "cluster_id": "<string>" }
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({cluster_id: '<string>'})
};
fetch('https://platform.ankra.app/org/applications/{application_id}/deployments/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/applications/{application_id}/deployments/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_id": "<string>"
}
'{
"cluster_id": "<string>",
"namespace": "<string>",
"operation_id": "<string>",
"status": "<string>",
"installation_id": "<string>",
"stack_name": "<string>",
"retained_stacks": [
"<string>"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Name the deployment to remove: the cluster it runs on and either the namespace it runs in (an installation) or the stack a deploy-wizard run created for it (a wizard deployment, which has no installation). Not both.
Response
The removal was accepted and its teardown job enqueued
The accepted removal: the deployment, the teardown operation following it, and for a wizard stack the other stacks the same deploy left standing. An installation reads removing until the teardown deletes it, or failed with its reason; a wizard stack reads removing on the deployments read until the cluster has it.