Create Cluster Access Grant Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/access/grants"
payload = { "user_email": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_email: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/access/grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/access/grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_email": "<string>"
}
'{
"grant": {
"ankra_user_id": "<string>",
"cluster_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"namespace": "<string>",
"organisation_id": "<string>",
"reconcile_error": "<string>",
"reconcile_status": "pending",
"reconciled_at": "2023-11-07T05:31:56Z",
"role": "view",
"scope": "cluster",
"user_email": "<string>"
}
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cluster Access
Create Cluster Access Grant Endpoint
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
access
/
grants
Create Cluster Access Grant Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/access/grants"
payload = { "user_email": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_email: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/access/grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/access/grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_email": "<string>"
}
'{
"grant": {
"ankra_user_id": "<string>",
"cluster_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"namespace": "<string>",
"organisation_id": "<string>",
"reconcile_error": "<string>",
"reconcile_status": "pending",
"reconciled_at": "2023-11-07T05:31:56Z",
"role": "view",
"scope": "cluster",
"user_email": "<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
Body
application/json
Response
Successful Response
Show child attributes
Show child attributes