Security posture by cluster and namespace (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/namespaces"
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/namespaces', 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/namespaces \
--cookie ankra_session={
"result": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"report_scope": "namespaced",
"workloads": 123,
"images": 123,
"pods": 123,
"sbom_images": 123,
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable_total": 123,
"accepted_risk": 123,
"fixable_severe": 123,
"known_exploited": 123,
"priority": "critical",
"last_scan": "2023-11-07T05:31:56Z",
"scanner_status": "fresh"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
},
"scanner": {
"fresh_clusters": 123,
"last_scan": "2023-11-07T05:31:56Z",
"stale_after_seconds": 123,
"stale_clusters": 123,
"status": "fresh",
"unscanned_clusters": 123,
"endpoint_scanner": {
"present": true,
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z"
}
]
}
}
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Security
Security posture by cluster and namespace (browser session)
Active finding occurrences grouped by cluster and namespace, with the scanned workloads and images, the pods the cluster runs there, and the actionable findings by severity. Cluster-scoped reports carry a row with an empty namespace and report_scope ‘cluster’.
GET
/
org
/
security
/
namespaces
Security posture by cluster and namespace (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/namespaces"
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/namespaces', 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/namespaces \
--cookie ankra_session={
"result": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"report_scope": "namespaced",
"workloads": 123,
"images": 123,
"pods": 123,
"sbom_images": 123,
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable_total": 123,
"accepted_risk": 123,
"fixable_severe": 123,
"known_exploited": 123,
"priority": "critical",
"last_scan": "2023-11-07T05:31:56Z",
"scanner_status": "fresh"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
},
"scanner": {
"fresh_clusters": 123,
"last_scan": "2023-11-07T05:31:56Z",
"stale_after_seconds": 123,
"stale_clusters": 123,
"status": "fresh",
"unscanned_clusters": 123,
"endpoint_scanner": {
"present": true,
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z"
}
]
}
}
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}