import requests
url = "https://platform.ankra.app/api/v1/clusters/ovh/{cluster_id}/node-groups/{group_name}/scale"
payload = { "count": 123 }
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({count: 123})
};
fetch('https://platform.ankra.app/api/v1/clusters/ovh/{cluster_id}/node-groups/{group_name}/scale', 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/ovh/{cluster_id}/node-groups/{group_name}/scale \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"count": 123
}'{
"group_name": "<string>",
"new_count": 123,
"previous_count": 123
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Scale node group
Sets the node group’s node count to count. A scale-down drains the removed workers through their PodDisruptionBudgets; force_drain bypasses them for this request. By default the change runs in the background and the call answers 202 {"status": "accepted"} (409 if the same change is already in flight); pass wait=true to run it in the request and receive the result.
import requests
url = "https://platform.ankra.app/api/v1/clusters/ovh/{cluster_id}/node-groups/{group_name}/scale"
payload = { "count": 123 }
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({count: 123})
};
fetch('https://platform.ankra.app/api/v1/clusters/ovh/{cluster_id}/node-groups/{group_name}/scale', 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/ovh/{cluster_id}/node-groups/{group_name}/scale \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"count": 123
}'{
"group_name": "<string>",
"new_count": 123,
"previous_count": 123
}{
"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.
Query Parameters
Body
Scale-down only. Remove the workers this request takes away without honouring PodDisruptionBudgets: each is drained the way a cluster teardown drains it and removed even when its drain is refused or its node cannot be reached. Off by default: a scale-down drains the removed workers one at a time through their budgets and keeps a worker whose drain is refused.