import requests
url = "https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/autoscaling"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/autoscaling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/autoscaling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"group_name": "<string>",
"max_count": 123,
"min_count": 123,
"message": "<string>",
"node_count": 123,
"operation_id": "<string>",
"target_count": 123
}{
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "accepted"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Update node-group autoscaling
Writes the node group’s autoscaling settings. The Cluster Autoscaler cannot add or remove Proxmox VE workers, so enabled=true answers 409; enabled=false stays accepted so a stored setting can be cleared. By default the change runs in the background and the call answers 202; pass wait=true to run it in the request and receive the result. Requires clusters.write.
import requests
url = "https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/autoscaling"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/autoscaling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/autoscaling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"group_name": "<string>",
"max_count": 123,
"min_count": 123,
"message": "<string>",
"node_count": 123,
"operation_id": "<string>",
"target_count": 123
}{
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "accepted"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Run the change in the request and answer its result. Off by default: the change runs in the background and the call answers 202.
Response
The change's result (wait=true)
PUT only. What the write does to the group's node count, in words.
PUT only. The group's node count when the write was made.
PUT only. The operation applying the write; absent when none was created now (a stopped cluster, an operation already working on the cluster, or nothing to apply).
PUT only. The node count the write moves the group to: max_count when the group had more nodes, min_count when it had fewer (while autoscaling is enabled), node_count otherwise. A group above max_count scales down through the guarded removal of its least busy nodes, each drained once the pipeline steps on it finish.