List the resources failing one compliance control (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance/checks/{check_id}/resources"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance/checks/{check_id}/resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance/checks/{check_id}/resources \
--cookie ankra_session={
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"check_id": "<string>",
"benchmark_id": "<string>",
"source": "benchmark",
"control_title": "<string>",
"resolved_check_ids": [
"<string>"
],
"resources": [
{
"kind": "<string>",
"name": "<string>",
"namespace": "<string>",
"check_id": "<string>",
"severity": "<string>",
"message": "<string>",
"report_kind": "<string>",
"owner": {
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_kind": "<string>",
"name": "<string>",
"namespace": "<string>",
"stack_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"matched_by": "release"
}
}
],
"is_truncated": true,
"unresolved_reason": "<string>"
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}Security
List the resources failing one compliance control (browser session)
Lists the Kubernetes objects failing one compliance control, each annotated with the add-on or manifest that deploys it and that resource’s stack. Pass source (benchmark or config_audit) and, for benchmark checks, benchmark_id; requires security.read.
GET
/
org
/
clusters
/
imported
/
{cluster_id}
/
security
/
compliance
/
checks
/
{check_id}
/
resources
List the resources failing one compliance control (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance/checks/{check_id}/resources"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance/checks/{check_id}/resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/compliance/checks/{check_id}/resources \
--cookie ankra_session={
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"check_id": "<string>",
"benchmark_id": "<string>",
"source": "benchmark",
"control_title": "<string>",
"resolved_check_ids": [
"<string>"
],
"resources": [
{
"kind": "<string>",
"name": "<string>",
"namespace": "<string>",
"check_id": "<string>",
"severity": "<string>",
"message": "<string>",
"report_kind": "<string>",
"owner": {
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_kind": "<string>",
"name": "<string>",
"namespace": "<string>",
"stack_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"matched_by": "release"
}
}
],
"is_truncated": true,
"unresolved_reason": "<string>"
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Query Parameters
Response
The failing objects for the control with their Ankra ownership; a 503 envelope when the cluster is offline, has no agent, or the agent timed out.
The Kubernetes objects failing one compliance control on a cluster, read live from the cluster's trivy-operator reports and attributed to Ankra stacks and resources.