Grant a scoped role to a member (members.manage)
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/assignments"
payload = { "ankra_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({ankra_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/assignments', 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/org/organisation/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ankra_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ankra_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_slug": "<string>",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope_type": "<string>",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "<string>"
}Organisation IAM
Grant a scoped role to a member (members.manage)
POST
/
api
/
v1
/
org
/
organisation
/
assignments
Grant a scoped role to a member (members.manage)
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/assignments"
payload = { "ankra_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({ankra_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/organisation/assignments', 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/org/organisation/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ankra_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ankra_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_slug": "<string>",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope_type": "<string>",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Available options:
organisation, cluster, cluster_group Exactly one of role_slug and role_id must be supplied.
An existing custom role in this organisation.
Required for cluster and cluster_group; null for organisation.