Export the organisation compliance evidence report (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/compliance-report"
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/security/compliance-report', 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/security/compliance-report \
--cookie ankra_session={
"attestation": {
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"trivy_operator_installed": true
}
],
"mfa_required": true,
"security_baseline_enabled": true,
"sops_initialised": true
},
"audit_summary": {
"actions": [
{
"action_type": "<string>",
"count": 123
}
],
"total": 123
},
"compliance": {
"clusters": [
{
"benchmarks": [
{
"fail_count": 123,
"failed_checks": 123,
"pass_count": 123,
"spec_id": "<string>",
"title": "<string>",
"updated_at": "<string>"
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"config_audit": {
"failed_count": 123,
"report_count": 123,
"severity": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123
}
},
"detail": "<string>",
"status": "available"
}
]
},
"dispositions": [
{
"active_match_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"disposition": "acknowledged",
"expire_when_fix_available": true,
"expires_at": "2023-11-07T05:31:56Z",
"fix_available_match_count": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_evaluated_at": "2023-11-07T05:31:56Z",
"last_matched_at": "2023-11-07T05:31:56Z",
"match_health": "<string>",
"matched_occurrence_count": 123,
"reason": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"revoked_by": "<string>",
"revoked_reason": "<string>",
"selector": {
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addon_slug": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cve_id": "<string>",
"explicit_broad": true,
"image_digest": "<string>",
"package_name": "<string>",
"package_type": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"workload_namespace": "<string>"
},
"selector_hash": "<string>",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"findings": {
"fixable_severe": 123,
"severity": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"totals": {
"accepted_risk": 123,
"acknowledged": 123,
"actionable": 123,
"observed": 123,
"resolved": 123
}
},
"generated_at": "2023-11-07T05:31:56Z",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"posture": [
{
"accepted_risk_critical": 123,
"accepted_risk_findings": 123,
"accepted_risk_high": 123,
"acknowledged_critical": 123,
"acknowledged_findings": 123,
"acknowledged_high": 123,
"actionable_critical": 123,
"actionable_findings": 123,
"actionable_fixable_critical": 123,
"actionable_fixable_high": 123,
"actionable_high": 123,
"actionable_low": 123,
"actionable_medium": 123,
"actionable_risk_score": 123,
"actionable_unknown": 123,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"critical": 123,
"date": "<string>",
"findings": 123,
"fixable_critical": 123,
"fixable_high": 123,
"high": 123,
"low": 123,
"medium": 123,
"namespaces": 123,
"risk_score": 123,
"unknown": 123,
"workloads": 123,
"access_posture": {
"grants_total": 123,
"standing_elevated": 123,
"over_policy": 123,
"impersonate_reachable": 123,
"impersonate_verified_grants": 123
}
}
],
"window": {
"end_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z"
}
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Security
Export the organisation compliance evidence report (browser session)
Downloads the organisation’s compliance evidence report (posture, findings, dispositions, audit summary, attestation and compliance) as a JSON or sectioned CSV attachment, chosen with format. Requires both security.read and audit.read; the audit window can be bounded with start_date and end_date.
GET
/
org
/
security
/
compliance-report
Export the organisation compliance evidence report (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/compliance-report"
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/security/compliance-report', 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/security/compliance-report \
--cookie ankra_session={
"attestation": {
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"trivy_operator_installed": true
}
],
"mfa_required": true,
"security_baseline_enabled": true,
"sops_initialised": true
},
"audit_summary": {
"actions": [
{
"action_type": "<string>",
"count": 123
}
],
"total": 123
},
"compliance": {
"clusters": [
{
"benchmarks": [
{
"fail_count": 123,
"failed_checks": 123,
"pass_count": 123,
"spec_id": "<string>",
"title": "<string>",
"updated_at": "<string>"
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"config_audit": {
"failed_count": 123,
"report_count": 123,
"severity": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123
}
},
"detail": "<string>",
"status": "available"
}
]
},
"dispositions": [
{
"active_match_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"disposition": "acknowledged",
"expire_when_fix_available": true,
"expires_at": "2023-11-07T05:31:56Z",
"fix_available_match_count": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_evaluated_at": "2023-11-07T05:31:56Z",
"last_matched_at": "2023-11-07T05:31:56Z",
"match_health": "<string>",
"matched_occurrence_count": 123,
"reason": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"revoked_by": "<string>",
"revoked_reason": "<string>",
"selector": {
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addon_slug": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cve_id": "<string>",
"explicit_broad": true,
"image_digest": "<string>",
"package_name": "<string>",
"package_type": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"workload_namespace": "<string>"
},
"selector_hash": "<string>",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"findings": {
"fixable_severe": 123,
"severity": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"totals": {
"accepted_risk": 123,
"acknowledged": 123,
"actionable": 123,
"observed": 123,
"resolved": 123
}
},
"generated_at": "2023-11-07T05:31:56Z",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"posture": [
{
"accepted_risk_critical": 123,
"accepted_risk_findings": 123,
"accepted_risk_high": 123,
"acknowledged_critical": 123,
"acknowledged_findings": 123,
"acknowledged_high": 123,
"actionable_critical": 123,
"actionable_findings": 123,
"actionable_fixable_critical": 123,
"actionable_fixable_high": 123,
"actionable_high": 123,
"actionable_low": 123,
"actionable_medium": 123,
"actionable_risk_score": 123,
"actionable_unknown": 123,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"critical": 123,
"date": "<string>",
"findings": 123,
"fixable_critical": 123,
"fixable_high": 123,
"high": 123,
"low": 123,
"medium": 123,
"namespaces": 123,
"risk_score": 123,
"unknown": 123,
"workloads": 123,
"access_posture": {
"grants_total": 123,
"standing_elevated": 123,
"over_policy": 123,
"impersonate_reachable": 123,
"impersonate_verified_grants": 123
}
}
],
"window": {
"end_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z"
}
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Query Parameters
Response
The compliance evidence report as a Content-Disposition attachment; the audit summary is scoped to the requested start_date/end_date window.