import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name}"
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/api/v1/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name} \
--header 'Authorization: Bearer <token>'{
"status": "connected",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod_name": "<string>",
"pod_uid": "<string>",
"node": "<string>",
"phase": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"stack": {
"stack_name": "<string>",
"member_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_kind": "addon",
"member_name": "<string>"
},
"stack_attribution": "attributed",
"scanner": {
"fresh_clusters": 123,
"last_scan": "2023-11-07T05:31:56Z",
"stale_after_seconds": 123,
"stale_clusters": 123,
"status": "fresh",
"unscanned_clusters": 123
},
"intelligence": {
"epss_synced_at": "2023-11-07T05:31:56Z",
"kev_listed": 123,
"kev_synced_at": "2023-11-07T05:31:56Z"
},
"findings": {
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"containers": 123,
"scanned_containers": 123
},
"sbom": {
"containers": 123,
"with_sbom": 123,
"without_sbom": 123,
"images": 123,
"components": 123,
"latest_generated_at": "2023-11-07T05:31:56Z",
"coverage": {
"scanned_clusters": 123,
"clusters_with_sbom": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_generated_at": "2023-11-07T05:31:56Z"
}
},
"containers": [
{
"name": "<string>",
"kind": "app",
"image": "<string>",
"image_digest": "<string>",
"image_identity": "<string>",
"ready": true,
"restart_count": 123,
"scanned": true,
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"sbom_status": "present",
"component_count": 123,
"os_name": "<string>",
"generated_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>"
}
]
}{
"detail": "<string>"
}Get imported cluster pod security posture
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name}"
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/api/v1/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name} \
--header 'Authorization: Bearer <token>'{
"status": "connected",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod_name": "<string>",
"pod_uid": "<string>",
"node": "<string>",
"phase": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"stack": {
"stack_name": "<string>",
"member_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_kind": "addon",
"member_name": "<string>"
},
"stack_attribution": "attributed",
"scanner": {
"fresh_clusters": 123,
"last_scan": "2023-11-07T05:31:56Z",
"stale_after_seconds": 123,
"stale_clusters": 123,
"status": "fresh",
"unscanned_clusters": 123
},
"intelligence": {
"epss_synced_at": "2023-11-07T05:31:56Z",
"kev_listed": 123,
"kev_synced_at": "2023-11-07T05:31:56Z"
},
"findings": {
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"containers": 123,
"scanned_containers": 123
},
"sbom": {
"containers": 123,
"with_sbom": 123,
"without_sbom": 123,
"images": 123,
"components": 123,
"latest_generated_at": "2023-11-07T05:31:56Z",
"coverage": {
"scanned_clusters": 123,
"clusters_with_sbom": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_generated_at": "2023-11-07T05:31:56Z"
}
},
"containers": [
{
"name": "<string>",
"kind": "app",
"image": "<string>",
"image_digest": "<string>",
"image_identity": "<string>",
"ready": true,
"restart_count": 123,
"scanned": true,
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"sbom_status": "present",
"component_count": 123,
"os_name": "<string>",
"generated_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>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful response
The security summary of one running pod of an imported cluster: every container with its CVE posture and bill of materials.
connected: the CVE figures describe at least one scanned container. stale: the cluster's newest report is older than the freshness window. no_reports: the pod was found but no vulnerability report covers any of its containers (a bill of materials alone does not make the CVE figures observed). unscanned: the scanner has never reported on this cluster.
connected, stale, no_reports, unscanned The scanned workload the pod's containers were matched to through its owner chain.
The stack member that deploys the pod, when one of the cluster's stacks does; null when no add-on release or declared manifest object is in the pod's owner chain.
Show child attributes
Show child attributes
What stack means: attributed - the named member deploys the pod; none - the pod's whole owner chain is in the resource cache, every add-on and manifest member of the cluster's stacks was checked against it and none matched; unknown - part of the owner chain is not cached, or the members could not be read or decoded, so the null stack is not an answer.
attributed, none, unknown Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes