Bulk create or update roles

  • POST /_security/role

The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk create or update roles API cannot update roles that are defined in roles files.

  • Cluster privileges: manage_security

Query Parameters

refresh enum Refresh

If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.

Values: true false wait_for

Request

roles map string to RoleDescriptor required

A dictionary of role name to RoleDescriptor objects to add or update

Response