Get a cluster access policy 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>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cluster Access
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, naming the organisation searched (organisation_id, organisation_name): a proposal created in another organisation answers 404 here.
GET
/
api
/
v1
/
org
/
cluster-access-policy
/
proposals
/
{proposal_id}
Get a cluster access policy 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>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Response
Successful Response