Get one imported cluster's NetworkPolicy over-privilege score (browser session)
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/security/network-policy-overprivilege"
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/network-policy-overprivilege', 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/network-policy-overprivilege \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"egress": {
"broad_rules": 123,
"over_privilege_rate": 123,
"score": 123,
"total_admitting_rules": 123,
"total_workloads": 123,
"unprotected_workloads": 123
},
"findings": [
{
"affected_count": 123,
"direction": "ingress",
"id": "<string>",
"namespace": "<string>",
"policy_name": "<string>",
"reason": "<string>",
"remediation": "<string>",
"severity": "<string>",
"title": "<string>",
"workload": "<string>"
}
],
"findings_truncated": 123,
"ingress": {
"broad_rules": 123,
"over_privilege_rate": 123,
"score": 123,
"total_admitting_rules": 123,
"total_workloads": 123,
"unprotected_workloads": 123
},
"policy_mode": "<string>"
}{
"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 NetworkPolicy over-privilege score (browser session)
Scores how over-privileged the cluster’s NetworkPolicies are, with ingress and egress scored separately and a remediation row per finding, computed live from the cluster’s policy and workload objects. Requires security.read; answers 503 when the cluster or its agent cannot be reached.
GET
/
org
/
clusters
/
imported
/
{cluster_id}
/
security
/
network-policy-overprivilege
Get one imported cluster's NetworkPolicy over-privilege score (browser session)
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/security/network-policy-overprivilege"
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/network-policy-overprivilege', 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/network-policy-overprivilege \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"egress": {
"broad_rules": 123,
"over_privilege_rate": 123,
"score": 123,
"total_admitting_rules": 123,
"total_workloads": 123,
"unprotected_workloads": 123
},
"findings": [
{
"affected_count": 123,
"direction": "ingress",
"id": "<string>",
"namespace": "<string>",
"policy_name": "<string>",
"reason": "<string>",
"remediation": "<string>",
"severity": "<string>",
"title": "<string>",
"workload": "<string>"
}
],
"findings_truncated": 123,
"ingress": {
"broad_rules": 123,
"over_privilege_rate": 123,
"score": 123,
"total_admitting_rules": 123,
"total_workloads": 123,
"unprotected_workloads": 123
},
"policy_mode": "<string>"
}{
"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 two-axis NetworkPolicy over-privilege score computed from live policy and workload objects; a direction with total_workloads 0 is a no-data state (score 100 by construction) that callers must not present as tightness.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes