import requests
url = "https://platform.ankra.app/api/v1/org/ai-remediation/policy"
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/ai-remediation/policy', 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/ai-remediation/policy \
--header 'Authorization: Bearer <token>'{
"enabled": true,
"autonomy_level": "read_only",
"tier_overrides": {},
"slack_webhook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approver_user_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"max_actions_per_incident": 123,
"cooldown_minutes": 123,
"cluster_allow_list": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"updated_at": "2023-11-07T05:31:56Z"
}Read the auto-remediation policy
The bearer-token twin of the browser read, authorised the same way it is: any authenticated member of the organisation, with no named permission, because the portal already shows this document to every member. The PUT that writes the policy stays a browser session + CSRF + organisation-admin lane and has no token twin. An organisation that never configured a policy reads the disabled default document (enabled false, autonomy_level ‘propose’, updated_at null) rather than a 404.
import requests
url = "https://platform.ankra.app/api/v1/org/ai-remediation/policy"
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/ai-remediation/policy', 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/ai-remediation/policy \
--header 'Authorization: Bearer <token>'{
"enabled": true,
"autonomy_level": "read_only",
"tier_overrides": {},
"slack_webhook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approver_user_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"max_actions_per_incident": 123,
"cooldown_minutes": 123,
"cluster_allow_list": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The policy document, stored or defaulted.
The organisation's auto-remediation policy: whether Ankra may act on an incident by itself, how far, which tools are overridden, who may approve and which clusters are in scope. An organisation that never configured one reads the disabled default document rather than a 404, so updated_at is the only field that tells "nobody has configured this" apart from "somebody configured it this way": the column is NOT NULL, so a null one means there is no policy row at all.
false leaves auto-remediation switched off entirely, whatever the rest of the document says.
read_only observes, propose asks an approver first, auto acts unattended.
read_only, propose, auto Per-tool overrides of the autonomy level, keyed by tool name. A tool absent here follows autonomy_level.
Show child attributes
Show child attributes
The Slack integration that carries the approve/deny cards; null means approvals are portal-only.
The members who may decide a pending action. Empty means every organisation admin may.
Absent (null) and empty are opposite states, not degrees of the same one: null admits every cluster, an empty list admits none.
null exactly when no policy row exists, so this is what "is auto-remediation configured at all?" is keyed off.