Get one imported cluster's stored security policy mode
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/policy-mode"
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/policy-mode', 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/policy-mode \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_engine_installed": true,
"policy_mode": "off",
"requested_mode": "off"
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Security
Get one imported cluster's stored security policy mode
Returns the security-baseline policy mode the platform has stored for the cluster (off, audit or enforce), read from the database without contacting the cluster, so it answers while the cluster is offline. off means the policy engine was switched off and is not installed; null means no security baseline is installed. Requires security.read.
GET
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
security
/
policy-mode
Get one imported cluster's stored security policy mode
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/security/policy-mode"
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/policy-mode', 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/policy-mode \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_engine_installed": true,
"policy_mode": "off",
"requested_mode": "off"
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Response
The cluster's stored security-baseline policy mode: off, audit or enforce, or null when no security baseline is installed.
A cluster's stored security-baseline policy mode, read from the database.