Update node-group labels
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/labels"
payload = { "labels": {} }
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({labels: {}})
};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/labels', 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/digitalocean/{cluster_id}/node-groups/{group_name}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"labels": {}
}'{
"group_name": "<string>",
"updated": 123
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}DigitalOcean Clusters
Update node-group labels
Replaces the Kubernetes labels on every node in the node group with the given labels map. 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.
PUT
/
api
/
v1
/
clusters
/
digitalocean
/
{cluster_id}
/
node-groups
/
{group_name}
/
labels
Update node-group labels
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/labels"
payload = { "labels": {} }
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({labels: {}})
};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/labels', 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/digitalocean/{cluster_id}/node-groups/{group_name}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"labels": {}
}'{
"group_name": "<string>",
"updated": 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
application/json
Show child attributes
Show child attributes