Bulk delete roles
- DELETE /_security/role
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files.
- Cluster privileges:
manage_security
Query Parameters
-
refreshRefresh If
true(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.-
Values:
truefalsewait_for
Response
application/json
-
deletedstring -
Array of deleted roles
-
not_foundstring -
Array of roles that could not be found
-
errorsBulkError -
Present if any deletes resulted in errors
-
countnumberrequired -
The number of errors
-
detailsmap string to ErrorCauserequired -
Details about the errors, keyed by role name
-
<string>ErrorCause -
typestringrequired -
The type of error
-
reasonstringnullable -
A human-readable explanation of the error, in English.
-
stack_tracestring -
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
caused_byErrorCause -
root_causeErrorCause -
suppressedErrorCause