import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/withdraw-removal"
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/api/v1/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://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/withdraw-removal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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>"
}{
"detail": "<string>"
}Withdraw a pending application deployment removal
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. Bearer personal access token; the CLI twin of the browser route (no CSRF header).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/withdraw-removal"
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/api/v1/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://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/withdraw-removal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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>"
}{
"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.