Skip to main content
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)
{
  "grant": {
    "id": "<string>",
    "organisation_id": "<string>",
    "cluster_id": "<string>",
    "ankra_user_id": "<string>",
    "namespace": "<string>",
    "reconcile_error": "<string>",
    "reconciled_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "user_email": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

cluster_id
string<uuid4>
required

Body

application/json
user_email
string
required
scope
enum<string>
required
Available options:
cluster,
namespace
role
enum<string>
required
Available options:
view,
edit,
admin,
cluster-admin
namespace
string | null

Response

Successful Response

grant
ClusterAccessGrant · object
required