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 whose agent advertises pipeline steps, and in no other organisation’s pool. 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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The complete list of listed members. Members not named are unlisted; an empty list returns the organisation to its one declared CI cluster.
At most 16 members, each cluster once.
16Show child attributes
Show child attributes
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.