import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/deployments/withdraw-removal"
payload = { "cluster_id": "<string>" }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({cluster_id: '<string>'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/deployments/withdraw-removal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/applications/{application_id}/deployments/withdraw-removal \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "<string>"
}
'{
"removal_withdrawn": true,
"cluster_id": "<string>",
"namespace": "<string>",
"status_assumed": true,
"applied_now": true,
"commit_deferred": true,
"commit_sha": "<string>",
"commit_url": "<string>",
"message": "<string>",
"installation_id": "<string>",
"stack_name": "<string>",
"status": "<string>",
"commit_failure": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "removal_not_pending"
}{
"detail": "<string>"
}Withdraw a pending application deployment removal (browser session)
Take back the removal of one deployment that was removed while its cluster was stopped and is still waiting for the cluster to start. The deployment’s resources stop being removed, it is declared in the cluster’s Git repository again, and its installation gets back the status and error it had before the removal. On a stopped cluster the deployment comes back when the cluster starts; on a cluster that has started but has not carried the removal out yet, it is applied again now. Once the removal has been carried out there is nothing to take back: deploy the application again. 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/withdraw-removal.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/deployments/withdraw-removal"
payload = { "cluster_id": "<string>" }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({cluster_id: '<string>'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/deployments/withdraw-removal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/applications/{application_id}/deployments/withdraw-removal \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "<string>"
}
'{
"removal_withdrawn": true,
"cluster_id": "<string>",
"namespace": "<string>",
"status_assumed": true,
"applied_now": true,
"commit_deferred": true,
"commit_sha": "<string>",
"commit_url": "<string>",
"message": "<string>",
"installation_id": "<string>",
"stack_name": "<string>",
"status": "<string>",
"commit_failure": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "removal_not_pending"
}{
"detail": "<string>"
}Authorizations
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 taken back
The removal taken back: which deployment, what its installation reads again, when it is applied again, and where the change stands in Git.