Adds a set of RoleAssignments to the specified User. Currently unavailable in self-hosted ECE.
Responses
-
Role Assignments were successfully added to the target User
-
The target user Id is invalid. (code:
role_assignments.invalid_target_user_id) -
Credentials were invalid. (code:
root.unauthorized) -
You are not authorised to add the specified RoleAssignments. (code:
role_assignments.unauthorized_role_assignments)
POST
/users/{user_id}/role_assignments
curl \
--request POST 'https://api.elastic-cloud.com/api/v1/users/{user_id}/role_assignments' \
--header "Content-Type: application/json" \
--data '{
"platform": [
{
"role_id": "string"
}
],
"organization": [
{
"role_id": "string",
"organization_id": "string",
"application_roles": [
"string"
]
}
],
"deployment": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"deployment_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"project": {
"elasticsearch": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"observability": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"security": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"workplaceai": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
]
}
}'