Create or update roles
https://{kibana_url}
- POST /api/security/roles
Request
-
rolesmap string to objectrequired -
<string>object -
descriptionstring · max: 2048 -
A description for the role.
-
elasticsearchobjectrequired -
clusterstring -
indicesobject -
allow_restricted_indicesboolean -
Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field covers the restricted indices too.
-
field_securitymap string to string -
namesstring · min: 1required -
privilegesstring · min: 1required -
querystring -
A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.
-
remote_clusterobject -
clustersstring · min: 1required -
privilegesstring · min: 1required -
remote_indicesobject -
allow_restricted_indicesboolean -
Restricted indices are a special category of indices that are used internally to store configuration data and should not be directly accessed. Only internal system roles should normally grant privileges over the restricted indices. Toggling this flag is very strongly discouraged because it could effectively grant unrestricted operations on critical data, making the entire system unstable or leaking sensitive information. If for administrative purposes you need to create a role with privileges covering restricted indices, however, you can set this property to true. In that case, the names field will cover the restricted indices too.
-
clustersstring · min: 1required -
field_securitymap string to string -
namesstring · min: 1required -
privilegesstring · min: 1required -
querystring -
A search query that defines the documents the role members have read access to. A document within the specified data streams and indices must match this query in order for it to be accessible by the role members.
-
run_asstring -
kibanaobject · max: 1000 -
metadatamap string to object
Response
Indicates a successful call.