import requests
url = "https://platform.ankra.app/api/v1/org/security/pods"
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/security/pods', 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/security/pods \
--header 'Authorization: Bearer <token>'{
"result": [
{
"name": "<string>",
"uid": "<string>",
"namespace": "<string>",
"node": "<string>",
"phase": "<string>",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"containers": [
{
"name": "<string>",
"kind": "app",
"image": "<string>",
"image_digest": "<string>",
"ready": true,
"restart_count": 123,
"scanned": true,
"scan_status": "scanned",
"match_basis": "workload_uid",
"stale_reason": "image_digest_mismatch",
"report_digest": "<string>",
"report_observed_at": "2023-11-07T05:31:56Z",
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123
}
],
"scanned": true,
"scanned_containers": 123,
"unscanned_containers": [
"<string>"
],
"stale_containers": [
"<string>"
],
"scan_coverage": "full",
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"priority": "critical"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
},
"capped": true
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}The pods of one namespace joined to their scanned workload's findings
The running pods of one namespace on one cluster, each container joined to the findings of the scanned workload container behind it through the pod’s owner chain and held to the image digest the container runs. A container without a vulnerability report is marked scanned=false; a container whose report describes another image or a replaced workload is stale, with its figures withheld. A pod is scanned only when every container is, and scan_coverage, unscanned_containers and stale_containers name the containers a partially scanned pod is missing. Narrow to one workload with workload_uid, or workload_kind and workload_name.
import requests
url = "https://platform.ankra.app/api/v1/org/security/pods"
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/security/pods', 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/security/pods \
--header 'Authorization: Bearer <token>'{
"result": [
{
"name": "<string>",
"uid": "<string>",
"namespace": "<string>",
"node": "<string>",
"phase": "<string>",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"containers": [
{
"name": "<string>",
"kind": "app",
"image": "<string>",
"image_digest": "<string>",
"ready": true,
"restart_count": 123,
"scanned": true,
"scan_status": "scanned",
"match_basis": "workload_uid",
"stale_reason": "image_digest_mismatch",
"report_digest": "<string>",
"report_observed_at": "2023-11-07T05:31:56Z",
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123
}
],
"scanned": true,
"scanned_containers": 123,
"unscanned_containers": [
"<string>"
],
"stale_containers": [
"<string>"
],
"scan_coverage": "full",
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"priority": "critical"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
},
"capped": true
}{
"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
The project to read: a project's UUID, or all for the whole organisation. Absent, the project the request acts in. A pinned token and a member limited to projects get a 403 for anything past their project.
1 <= x <= 10000Values above 100 are clamped to 100.
x >= 1