import requests
url = "https://platform.ankra.app/api/v1/org/security/sbom/containers"
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/sbom/containers', 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/sbom/containers \
--header 'Authorization: Bearer <token>'{
"result": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"pod_name": "<string>",
"pod_uid": "<string>",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "app",
"image": "<string>",
"image_digest": "<string>",
"sbom_status": "present",
"image_identity": "<string>",
"component_count": 123,
"os_name": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
},
"inventory": {
"containers": 123,
"with_sbom": 123,
"without_sbom": 123,
"pods": 123
},
"coverage": {
"scanned_clusters": 123,
"clusters_with_sbom": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_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>"
}
]
}Running containers and their bills of materials
Every container the resource cache says is running on the scoped clusters, init containers included, joined to the bill of materials of its image - or marked absent when the scanner has none for it. Absent is a state to act on (SBOM generation off, a registry the scanner cannot pull from, a tag rolled since the last scan), not an empty image. Sorted absent-first by default.
import requests
url = "https://platform.ankra.app/api/v1/org/security/sbom/containers"
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/sbom/containers', 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/sbom/containers \
--header 'Authorization: Bearer <token>'{
"result": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"namespace": "<string>",
"pod_name": "<string>",
"pod_uid": "<string>",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "app",
"image": "<string>",
"image_digest": "<string>",
"sbom_status": "present",
"image_identity": "<string>",
"component_count": 123,
"os_name": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
},
"inventory": {
"containers": 123,
"with_sbom": 123,
"without_sbom": 123,
"pods": 123
},
"coverage": {
"scanned_clusters": 123,
"clusters_with_sbom": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_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>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
1 <= x <= 10000Values above 100 are clamped to 100.
x >= 1Match image, container, pod, workload or namespace.
One cluster; omit for every live cluster of the organisation.
Match the resolved workload, its direct owner, or 'pod' for bare pods; case-insensitive.
Match the resolved workload, its direct owner, or the pod name; case-insensitive.
Only containers whose image has (present) or lacks (absent) a bill of materials.
present, absent, any status, image, container, pod, namespace, workload, cluster_name, components, last_seen_at asc, desc