List the workloads of an imported cluster stack with their security posture
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security/workloads"
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}/stacks/{stack_name}/security/workloads', 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}/stacks/{stack_name}/security/workloads \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"result": [
{
"member_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_kind": "addon",
"member_name": "<string>",
"kind": "<string>",
"namespace": "<string>",
"name": "<string>",
"uid": "<string>",
"pods": 123,
"scanned": true,
"observed": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"fixable_severe": 123,
"known_exploited": 123,
"containers": 123,
"containers_with_sbom": 123,
"containers_without_sbom": 123,
"last_scan": "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>"
}Security
List the workloads of an imported cluster stack with their security posture
The workloads each member of the stack resolved to directly, with the pods each runs, the CVE occurrences the scanner attributed to it and its running containers with and without a bill of materials. A workload no report names has scanned=false; its counts are then absent, not clean.
GET
/
org
/
clusters
/
imported
/
{cluster_id}
/
stacks
/
{stack_name}
/
security
/
workloads
List the workloads of an imported cluster stack with their security posture
import requests
url = "https://platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security/workloads"
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}/stacks/{stack_name}/security/workloads', 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}/stacks/{stack_name}/security/workloads \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"result": [
{
"member_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_kind": "addon",
"member_name": "<string>",
"kind": "<string>",
"namespace": "<string>",
"name": "<string>",
"uid": "<string>",
"pods": 123,
"scanned": true,
"observed": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"fixable_severe": 123,
"known_exploited": 123,
"containers": 123,
"containers_with_sbom": 123,
"containers_without_sbom": 123,
"last_scan": "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.