Set a cluster group's clusters
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/members"
payload = { "cluster_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
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({cluster_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/members', 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}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'{
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Organisation
Set a cluster group's clusters
Replaces the clusters of a static cluster group. Every cluster must belong to the organisation the token acts in. 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}
/
members
Set a cluster group's clusters
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/members"
payload = { "cluster_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
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({cluster_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/cluster-groups/{group_id}/members', 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}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'{
"success": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}