Create a new Kibana role or update the attributes of an existing role. Kibana roles are stored in the Elasticsearch native realm.
PUT
/api/security/role/{name}
curl \
--request PUT 'https://<KIBANA_URL>/api/security/role/{name}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"description":"My custom Kibana role.","elasticsearch":{"cluster":["monitor"],"indices":[{"names":["logs-*"],"privileges":["read"]}]},"kibana":[{"base":["read"],"feature":{},"spaces":["default"]}]}'
Request example
{
"description": "My custom Kibana role.",
"elasticsearch": {
"cluster": [
"monitor"
],
"indices": [
{
"names": [
"logs-*"
],
"privileges": [
"read"
]
}
]
},
"kibana": [
{
"base": [
"read"
],
"feature": {},
"spaces": [
"default"
]
}
]
}