Create a cluster group
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/cluster-groups"
payload = {
"name": "<string>",
"slug": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', slug: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/cluster-groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/organisation/cluster-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"membership_mode": "static",
"created_at": "<string>",
"selector": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Organisation
Create a cluster group
Creates a cluster group in the organisation the token acts in: a named set of clusters that role assignments can be scoped to, either static (members set explicitly) or dynamic (clusters whose labels match the selector). Requires members.manage, checked against the token’s scopes and then against the member’s role whatever the authorisation rollout state; a token pinned to a project is refused, since the setting has no per-project form.
POST
/
api
/
v1
/
org
/
organisation
/
cluster-groups
Create a cluster group
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/cluster-groups"
payload = {
"name": "<string>",
"slug": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', slug: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/cluster-groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/organisation/cluster-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"membership_mode": "static",
"created_at": "<string>",
"selector": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Headers
Body
application/json