import requests
url = "https://platform.ankra.app/api/v1/org/cluster-access-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/cluster-access-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/cluster-access-policy \
--header 'Authorization: Bearer <token>'{
"policy": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view",
"is_configured": true
},
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>"
}{
"detail": "Cluster not found"
}Get Cluster Access Policy
The organisation cluster access policy: the role the user who creates or imports a cluster receives on it, the highest role any cluster access grant may carry, the longest a grant above view may last, and the role from which grants need a reason. An organisation that has not set one reads the default (creator receives cluster-admin, no ceiling, no bounds) with is_configured false. Readable with kube_access.manage, kube_access.policy or kube_access.elevate (a break-glass holder reads the bounds it is held to). organisation_id and organisation_name name the organisation read: a token reads its own unless X-Ankra-Organisation-Id names another, so check them before reporting another organisation’s policy.
import requests
url = "https://platform.ankra.app/api/v1/org/cluster-access-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/cluster-access-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/cluster-access-policy \
--header 'Authorization: Bearer <token>'{
"policy": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view",
"is_configured": true
},
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>"
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
Show child attributes
Show child attributes
The organisation this policy belongs to: the one the request selected (a token's own unless X-Ankra-Organisation-Id names another, or the session's current organisation).
That organisation's name; null for an organisation without one.