NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Delete roles APIedit
Removes roles in the native realm.
Requestedit
DELETE /_xpack/security/role/<name>
Descriptionedit
The Roles API is generally the preferred way to manage roles, rather than using file-based role management. For more information about the native realm, see Realms and Configuring a native realm.
Path Parametersedit
-
name
- (string) The name of the role.
Authorizationedit
To use this API, you must have at least the manage_security
cluster
privilege.
Examplesedit
The following example deletes a my_admin_role
role:
DELETE /_xpack/security/role/my_admin_role
If the role is successfully deleted, the request returns {"found": true}
.
Otherwise, found
is set to false.
{ "found" : true }