import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/helm/releases/{namespace}/{name}/upgrade"
payload = {
"chart_ref": "<string>",
"values_yaml": "<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({chart_ref: '<string>', values_yaml: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/helm/releases/{namespace}/{name}/upgrade', 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/clusters/{cluster_id}/kubernetes/helm/releases/{namespace}/{name}/upgrade \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chart_ref": "<string>",
"values_yaml": "<string>"
}
'{
"elapsed_ms": 123,
"namespace": "<string>",
"release_name": "<string>",
"revision": 123
}{
"status": "accepted",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"release_name": "<string>",
"namespace": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Upgrade a Helm release
Upgrades a Helm release to chart_ref with exactly the supplied values_yaml, which replaces the release’s current values (an omitted chart_version keeps the installed chart version). Requires kubernetes.write; a release managed by an Ankra add-on is refused with 409 and must be changed through the add-on. By default the request waits for the agent’s answer; with async true it answers 202 with an operation_id and the upgrade’s verdict is recorded on that operation.
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/helm/releases/{namespace}/{name}/upgrade"
payload = {
"chart_ref": "<string>",
"values_yaml": "<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({chart_ref: '<string>', values_yaml: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/helm/releases/{namespace}/{name}/upgrade', 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/clusters/{cluster_id}/kubernetes/helm/releases/{namespace}/{name}/upgrade \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chart_ref": "<string>",
"values_yaml": "<string>"
}
'{
"elapsed_ms": 123,
"namespace": "<string>",
"release_name": "<string>",
"revision": 123
}{
"status": "accepted",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"release_name": "<string>",
"namespace": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
Follow the upgrade as an operation: answer 202 with operation_id at once instead of holding the request open until the agent replies. Read the outcome on GET /api/v1/org/executions/{operation_id} and its /result. The reply budget must fit the operation's 29 minutes, so timeout_seconds is at most 675 with wait and 1620 without.