import requests
url = "https://platform.ankra.app/api/v1/org/ci-settings/capacity/resources"
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/resources', 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/resources \
--header 'Authorization: Bearer <token>'{
"members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"resources": {
"state": "known",
"is_dedicated": true,
"node_group": "<string>",
"nodes": 123,
"allocatable_cpu_millicores": 123,
"allocatable_memory_bytes": 123,
"requested_cpu_millicores": 123,
"requested_memory_bytes": 123,
"ci_requested_cpu_millicores": 123,
"ci_requested_memory_bytes": 123
}
}
]
}Read the CPU and memory of the organisation's CI clusters
The CPU and memory of the nodes each member of the organisation’s CI pool places pipelines on: their summed allocatable, what every pod on them requests, and the part pipeline pods request, from the platform’s mirror of each cluster. Members come primary first, as in the capacity read’s pool_members. It is read apart from the capacity read because it reads every node and running pod of each cluster; each cluster’s answer is reused for up to a minute. A member whose nodes could not be read answers state unknown with every figure null. 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/resources"
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/resources', 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/resources \
--header 'Authorization: Bearer <token>'{
"members": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"resources": {
"state": "known",
"is_dedicated": true,
"node_group": "<string>",
"nodes": 123,
"allocatable_cpu_millicores": 123,
"allocatable_memory_bytes": 123,
"requested_cpu_millicores": 123,
"requested_memory_bytes": 123,
"ci_requested_cpu_millicores": 123,
"ci_requested_memory_bytes": 123
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Every CI pool member's CPU and memory.
Every CI pool member's CPU and memory, primary first (ankra-q573dh.66).
Show child attributes
Show child attributes