Security posture by cluster and namespace
import requests
url = "https://platform.ankra.app/org/security/namespaces"
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/security/namespaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/security/namespaces \
--header 'Authorization: Bearer <token>'{
"result": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"report_scope": "namespaced",
"workloads": 123,
"images": 123,
"pods": 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
}
}{
"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
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
import requests
url = "https://platform.ankra.app/org/security/namespaces"
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/security/namespaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/security/namespaces \
--header 'Authorization: Bearer <token>'{
"result": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"report_scope": "namespaced",
"workloads": 123,
"images": 123,
"pods": 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
}
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Required range:
1 <= x <= 10000Values above 100 are clamped to 100.
Required range:
x >= 1Available options:
actionable, observed, critical, severity, workloads, images, pods, namespace, cluster_name, known_exploited, fixable_severe, last_scan Available options:
asc, desc