import requests
url = "https://platform.ankra.app/api/v1/org/cluster-access-policy/proposals/{proposal_id}"
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/proposals/{proposal_id}', 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/proposals/{proposal_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"proposed": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view"
},
"base": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view",
"is_configured": true
},
"current": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view",
"is_configured": true
},
"base_matches_current": true,
"reason": "<string>",
"proposed_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"principal": "<string>",
"token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"decided_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decided_at": "2023-11-07T05:31:56Z",
"decision_note": "<string>",
"apply_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get a cluster access policy proposal
One cluster access policy proposal: the proposed policy, the policy it was proposed against (base), the current policy and whether it still matches base, the reason, the proposer and the token that carried the proposal, its status, expiry and decision, and the apply_url. Readable with kube_access.manage, kube_access.policy or kube_access.elevate; 404 when the organisation has no such proposal.
import requests
url = "https://platform.ankra.app/api/v1/org/cluster-access-policy/proposals/{proposal_id}"
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/proposals/{proposal_id}', 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/proposals/{proposal_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"proposed": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view"
},
"base": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view",
"is_configured": true
},
"current": {
"creator_grant_role": "none",
"max_grant_role": "view",
"elevated_max_ttl_seconds": 15768030,
"require_reason_from_role": "view",
"is_configured": true
},
"base_matches_current": true,
"reason": "<string>",
"proposed_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"principal": "<string>",
"token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"decided_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decided_at": "2023-11-07T05:31:56Z",
"decision_note": "<string>",
"apply_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
A pending proposal past expires_at reads as expired.
pending, applied, dismissed, expired, superseded Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
false means the policy changed since the proposal was made, and applying it answers 409 policy_changed.
Show child attributes
Show child attributes
The Ankra web app page (Organisation > Roles, with ?org= and ?proposal=) an owner or admin applies the proposal from, signed in.