Get one imported cluster's compliance view
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance"
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/org/clusters/imported/{cluster_id}/security/compliance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance \
--header 'Authorization: Bearer <token>'{
"benchmarks": [
{
"fail_count": 123,
"failed_checks": [
{
"affected_count": 123,
"id": "<string>",
"remediation": "<string>",
"severity": "<string>",
"title": "<string>"
}
],
"pass_count": 123,
"passed_checks": [
{
"id": "<string>",
"severity": "<string>",
"title": "<string>"
}
],
"spec_id": "<string>",
"title": "<string>",
"updated_at": "<string>"
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"config_audit": {
"namespaces": [
{
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"namespace": "<string>"
}
],
"report_count": 123,
"severity": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123
},
"top_failed_checks": [
{
"count": 123,
"id": "<string>",
"remediation": "<string>",
"severity": "<string>",
"title": "<string>"
}
]
},
"detail": "<string>",
"is_truncated": true,
"status": "available"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "CLUSTER_OFFLINE",
"retry_after": 123
}Security
Get one imported cluster's compliance view
GET
/
org
/
clusters
/
imported
/
{cluster_id}
/
security
/
compliance
Get one imported cluster's compliance view
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance"
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/org/clusters/imported/{cluster_id}/security/compliance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance \
--header 'Authorization: Bearer <token>'{
"benchmarks": [
{
"fail_count": 123,
"failed_checks": [
{
"affected_count": 123,
"id": "<string>",
"remediation": "<string>",
"severity": "<string>",
"title": "<string>"
}
],
"pass_count": 123,
"passed_checks": [
{
"id": "<string>",
"severity": "<string>",
"title": "<string>"
}
],
"spec_id": "<string>",
"title": "<string>",
"updated_at": "<string>"
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"config_audit": {
"namespaces": [
{
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"namespace": "<string>"
}
],
"report_count": 123,
"severity": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123
},
"top_failed_checks": [
{
"count": 123,
"id": "<string>",
"remediation": "<string>",
"severity": "<string>",
"title": "<string>"
}
]
},
"detail": "<string>",
"is_truncated": true,
"status": "available"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "CLUSTER_OFFLINE",
"retry_after": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
The cluster's compliance benchmark summaries with failed checks and the aggregated config-audit counts; not_available with a detail when trivy-operator (or its compliance controller) has published nothing.