import requests
url = "https://platform.ankra.app/api/v1/org/ci-settings/pool"
payload = { "members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weight": 500
}
] }
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({members: [{cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', weight: 500}]})
};
fetch('https://platform.ankra.app/api/v1/org/ci-settings/pool', 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/ci-settings/pool \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weight": 500
}
]
}
'{
"is_pooled": true,
"members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"weight": 500,
"is_primary": true,
"is_listed": true,
"created_at": "2023-11-07T05:31:56Z"
}
]
}Replace the organisation's CI cluster pool
Makes the listed members exactly the given list, in one transaction. Every member must be a live cluster of this organisation with an agent, and in no other organisation’s pool. Ankra switches pipeline-step workers on for a member whose agent runs none. Runs already pinned to an unlisted member finish there. Organisation admins only. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication; writes also need the X-Ankra-CSRF header).
import requests
url = "https://platform.ankra.app/api/v1/org/ci-settings/pool"
payload = { "members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weight": 500
}
] }
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({members: [{cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', weight: 500}]})
};
fetch('https://platform.ankra.app/api/v1/org/ci-settings/pool', 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/ci-settings/pool \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"weight": 500
}
]
}
'{
"is_pooled": true,
"members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"weight": 500,
"is_primary": true,
"is_listed": true,
"created_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Body
Response
The pool as stored.
The organisation's CI cluster pool: the clusters its pipeline runs are spread across. Each run is pinned, at its first dispatch, to the least-loaded member whose agent can take a step, preferring the member where the repository last ran when the loads are within a fifth of a cluster's workers; a run never moves between clusters.