List the workloads of an imported cluster stack with their security posture (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security/workloads"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.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://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security/workloads \
--cookie ankra_session={
"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 (browser session)
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 (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security/workloads"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.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://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security/workloads \
--cookie ankra_session={
"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
Browser session. Mutations also require X-Ankra-CSRF.