import requests
url = "https://platform.ankra.app/api/v1/org/ci-settings/capacity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/ci-settings/capacity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/ci-settings/capacity \
--header 'Authorization: Bearer <token>'{
"cluster_id": "<string>",
"cluster_name": "<string>",
"ci_worker_count": 123,
"is_live_resize_supported": true,
"steps_in_flight_on_cluster": 123,
"organisation_runs_queued": 123,
"organisation_runs_in_flight": 123,
"organisation_steps_pending": 123,
"organisation_steps_waiting_on_slots": 123,
"max_parallel_runs": 123,
"max_parallel_steps": 123
}Read the organisation's pipeline capacity
How much pipeline work the organisation’s pipeline cluster can run at once and how much is waiting. ci_worker_count is the number of CI slots the cluster’s agent runs: a slot is one pipeline step the agent watches at a time, not a node, and the nodes those steps land on come from the cluster’s node group autoscaler. steps_in_flight_on_cluster counts every step occupying a slot on that cluster. The organisation_* counts are this organisation’s own runs and steps: runs queued, runs counted against max_parallel_runs, pending steps, and the pending steps held back because every slot is taken (zero whenever a slot is free). is_live_resize_supported reports whether the cluster’s agent applies a changed worker count without restarting. cluster_id and cluster_name are null, and the cluster’s numbers zero, when no pipeline cluster is chosen. Readable by any member. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).
import requests
url = "https://platform.ankra.app/api/v1/org/ci-settings/capacity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/ci-settings/capacity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/ci-settings/capacity \
--header 'Authorization: Bearer <token>'{
"cluster_id": "<string>",
"cluster_name": "<string>",
"ci_worker_count": 123,
"is_live_resize_supported": true,
"steps_in_flight_on_cluster": 123,
"organisation_runs_queued": 123,
"organisation_runs_in_flight": 123,
"organisation_steps_pending": 123,
"organisation_steps_waiting_on_slots": 123,
"max_parallel_runs": 123,
"max_parallel_steps": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The organisation's pipeline capacity.
The organisation's pipeline capacity: its pipeline cluster's CI slots, the steps occupying them, and the organisation's own queued and pending work. Every member is always present.
The organisation's pipeline cluster; null when none is chosen.
The pipeline cluster's name; null when none is chosen or it has been deleted.
CI slots the cluster's agent runs; 0 when pipeline steps are off or no cluster is chosen.
Whether the cluster's agent applies a changed worker count without restarting; false when unknown.
Pipeline steps occupying a slot on the cluster.
This organisation's runs still queued.
This organisation's runs counted against max_parallel_runs.
This organisation's pending steps on live runs.
This organisation's pending steps held back because every slot of the cluster is taken.
The organisation's ci_max_parallel_runs.
The organisation's ci_max_parallel_steps.