Delete role mappings API
Removes role mappings.
Request
DELETE /_security/role_mapping/<name>
Prerequisites
- To use this API, you must have at least the
manage_securitycluster privilege.
Description
Role mappings define which roles are assigned to each user. For more information, see Mapping users and groups to roles.
The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The delete role mappings API cannot remove role mappings that are defined in role mapping files.
Path parameters
-
name - (string) The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way.
Examples
The following example delete a role mapping:
DELETE /_security/role_mapping/mapping1
If the mapping is successfully deleted, the request returns {"found": true}. Otherwise, found is set to false.
{
"found" : true
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-api-delete-role-mapping.html