import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/trivy/history"
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/imported/{cluster_id}/security/trivy/history', 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/imported/{cluster_id}/security/trivy/history \
--header 'Authorization: Bearer <token>'{
"days": 123,
"items": [
{
"date": "<string>",
"findings": 123,
"critical": 123,
"high": 123,
"medium": 123,
"low": 123,
"unknown": 123,
"fixable_critical": 123,
"fixable_high": 123,
"workloads": 123,
"namespaces": 123,
"risk_score": 123,
"actionable_findings": 123,
"actionable_critical": 123,
"actionable_high": 123,
"actionable_medium": 123,
"actionable_low": 123,
"actionable_unknown": 123,
"actionable_fixable_critical": 123,
"actionable_fixable_high": 123,
"actionable_risk_score": 123,
"acknowledged_findings": 123,
"acknowledged_critical": 123,
"acknowledged_high": 123,
"accepted_risk_findings": 123,
"accepted_risk_critical": 123,
"accepted_risk_high": 123,
"access_posture": {
"grants_total": 123,
"standing_elevated": 123,
"over_policy": 123,
"impersonate_reachable": 123,
"impersonate_verified_grants": 123
}
}
],
"access_posture_history": [
{
"date": "<string>",
"access_posture": {
"grants_total": 123,
"standing_elevated": 123,
"over_policy": 123,
"impersonate_reachable": 123,
"impersonate_verified_grants": 123
},
"vulnerability_snapshot_recorded": true
}
]
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Daily security posture trend of one cluster
Returns the cluster’s daily vulnerability posture snapshots, oldest first: finding counts by severity, fixable critical and high counts, workloads, namespaces and risk score. days sets the window (default 90, at most 365); a cluster with no snapshots yet returns an empty list.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/trivy/history"
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/imported/{cluster_id}/security/trivy/history', 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/imported/{cluster_id}/security/trivy/history \
--header 'Authorization: Bearer <token>'{
"days": 123,
"items": [
{
"date": "<string>",
"findings": 123,
"critical": 123,
"high": 123,
"medium": 123,
"low": 123,
"unknown": 123,
"fixable_critical": 123,
"fixable_high": 123,
"workloads": 123,
"namespaces": 123,
"risk_score": 123,
"actionable_findings": 123,
"actionable_critical": 123,
"actionable_high": 123,
"actionable_medium": 123,
"actionable_low": 123,
"actionable_unknown": 123,
"actionable_fixable_critical": 123,
"actionable_fixable_high": 123,
"actionable_risk_score": 123,
"acknowledged_findings": 123,
"acknowledged_critical": 123,
"acknowledged_high": 123,
"accepted_risk_findings": 123,
"accepted_risk_critical": 123,
"accepted_risk_high": 123,
"access_posture": {
"grants_total": 123,
"standing_elevated": 123,
"over_policy": 123,
"impersonate_reachable": 123,
"impersonate_verified_grants": 123
}
}
],
"access_posture_history": [
{
"date": "<string>",
"access_posture": {
"grants_total": 123,
"standing_elevated": 123,
"over_policy": 123,
"impersonate_reachable": 123,
"impersonate_verified_grants": 123
},
"vulnerability_snapshot_recorded": true
}
]
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Trend window in days, 1 to 365 (default 90); out-of-range values are clamped.
Response
The cluster's daily posture snapshots for the requested window, oldest first; an empty items list when no vulnerability snapshot exists yet. access_posture_history lists the days the access posture was recorded, including days without a vulnerability snapshot.
The days with a vulnerability snapshot, oldest first. A day absent here recorded no Trivy rollup (no scanner, or no reports yet); it is not a day with zero findings.
Show child attributes
Show child attributes
The days on which the cluster's Kubernetes access posture was recorded, oldest first, including days with no vulnerability snapshot (a cluster without Trivy reports). A day absent here recorded no access posture, which is never a clean posture.
Show child attributes
Show child attributes