Set a cluster group's selector
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/selector"
payload = { "selector": {} }
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({selector: {}})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/selector', 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/org/organisation/cluster-groups/{group_id}/selector \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"selector": {}
}'{
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Organisation
Set a cluster group's selector
Switches a cluster group to dynamic membership: it holds every cluster of the organisation whose labels match the selector. Requires members.manage; a token pinned to a project is refused, since the setting has no per-project form.
PUT
/
api
/
v1
/
org
/
organisation
/
cluster-groups
/
{group_id}
/
selector
Set a cluster group's selector
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/selector"
payload = { "selector": {} }
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({selector: {}})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/selector', 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/org/organisation/cluster-groups/{group_id}/selector \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"selector": {}
}'{
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}