import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/baseline"
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/clusters/{cluster_id}/baseline', 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/clusters/{cluster_id}/baseline \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalogue_version": 123,
"computed": true,
"computed_at": "2023-11-07T05:31:56Z",
"score": 123,
"coverage": 123,
"weights": {
"passed": 123,
"failed": 123,
"unknown": 123,
"total": 123
},
"checks": [
{
"id": "<string>",
"title": "<string>",
"why": "<string>",
"data_source": "<string>",
"weight": 123,
"status": "pass",
"evidence": "<string>"
}
],
"gaps": [
{
"id": "<string>",
"title": "<string>",
"why": "<string>",
"data_source": "<string>",
"weight": 123,
"status": "pass",
"evidence": "<string>"
}
],
"unknowns": [
{
"id": "<string>",
"title": "<string>",
"why": "<string>",
"data_source": "<string>",
"weight": 123,
"status": "pass",
"evidence": "<string>"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Get a cluster's Baseline score
A cluster’s Ankra Baseline score: the latest nightly evaluation of the ten Baseline checks (metrics and logs, service-level alerts, backups with a tested restore, requests and limits, probes, PodDisruptionBudgets, pinned images, supported versions, certificate automation, no critical or known-exploited CVEs), each pass, fail or unknown with its evidence, the gaps heaviest first and the unknowns named. The score is passed weight over decided weight; unknown checks leave the denominator and are reported as coverage. A cluster the nightly recorder has not scored answers computed false with every check unknown, not a score of zero. Bearer-PAT twin of the browser route of the same name under /org; the console’s session cookie is not accepted here and the browser route answers a token with a login redirect.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/baseline"
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/clusters/{cluster_id}/baseline', 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/clusters/{cluster_id}/baseline \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalogue_version": 123,
"computed": true,
"computed_at": "2023-11-07T05:31:56Z",
"score": 123,
"coverage": 123,
"weights": {
"passed": 123,
"failed": 123,
"unknown": 123,
"total": 123
},
"checks": [
{
"id": "<string>",
"title": "<string>",
"why": "<string>",
"data_source": "<string>",
"weight": 123,
"status": "pass",
"evidence": "<string>"
}
],
"gaps": [
{
"id": "<string>",
"title": "<string>",
"why": "<string>",
"data_source": "<string>",
"weight": 123,
"status": "pass",
"evidence": "<string>"
}
],
"unknowns": [
{
"id": "<string>",
"title": "<string>",
"why": "<string>",
"data_source": "<string>",
"weight": 123,
"status": "pass",
"evidence": "<string>"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Response
Successful response
A cluster's latest stored Baseline score.