Adds the role assignments applicable when logging via SSO. Currently unavailable in self-hosted ECE.
Responses
-
An empty response
-
- Invalid rule. (code:
org.role_mapping_rule.ambiguous_rule) - Empty rule. (code:
org.role_mapping_rule.empty_rule) - Validation error. (code:
org.role_mapping_rule.syntax_error) - Validation error. (code:
org.role_mapping_rule.email_syntax_error) - Validation error. (code:
org.role_mapping_rule.too_many_role_mappings)
- Invalid rule. (code:
-
Organization not found. (code:
organization.not_found)
POST
/organizations/{organization_id}/role_mappings
curl \
--request POST 'https://{{hostname}}/api/v1/organizations/{organization_id}/role_mappings' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{
"mappings": [
{
"enabled": true,
"name": "string",
"rule": {
"any": [
{
"group": "string",
"email": "string"
}
],
"all": [
{
"group": "string",
"email": "string"
}
]
},
"role_assignments": {
"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"
]
}
],
"vectordb": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
]
}
}
}
]
}'