import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/addons/{addon_resource_id}"
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}/addons/{addon_resource_id}', 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}/addons/{addon_resource_id} \
--header 'Authorization: Bearer <token>'{
"marked_for_uninstall": true,
"commit_deferred": true,
"commit_sha": "<string>",
"commit_url": "<string>",
"pending_cluster_start": true
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Uninstall an add-on
Uninstalls an add-on from the cluster: in-flight changes to it are cancelled and it is marked for removal. Pass delete=true to remove it permanently and force=true to force-delete an add-on that is stuck uninstalling. On a stopped cluster a permanent, unforced removal is recorded and pushed to Git at once, and the add-on is uninstalled once the cluster is running or online (pending_cluster_start is true).
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/addons/{addon_resource_id}"
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}/addons/{addon_resource_id}', 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}/addons/{addon_resource_id} \
--header 'Authorization: Bearer <token>'{
"marked_for_uninstall": true,
"commit_deferred": true,
"commit_sha": "<string>",
"commit_url": "<string>",
"pending_cluster_start": true
}{
"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
The change is recorded, and its Git commit waits for the cluster to sync: Git carries edits to this cluster the platform has not synced yet, and a stopped cluster syncs them, and commits this change with them, once it starts. commit_sha and commit_url are then null.
The cluster was stopped: the removal is recorded and already out of the cluster's Git repository, and the add-on is uninstalled once the cluster is running or online.