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 are true, false, or wait_for.
DELETE /_security/role
{
"names": ["my_admin_role", "my_user_role"]
}
resp = client.security.bulk_delete_role(
names=[
"my_admin_role",
"my_user_role"
],
)
const response = await client.security.bulkDeleteRole({
names: ["my_admin_role", "my_user_role"],
});
response = client.security.bulk_delete_role(
body: {
"names": [
"my_admin_role",
"my_user_role"
]
}
)
$resp = $client->security()->bulkDeleteRole([
"body" => [
"names" => array(
"my_admin_role",
"my_user_role",
),
],
]);
curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"names":["my_admin_role","my_user_role"]}' "$ELASTICSEARCH_URL/_security/role"
{
"names": ["my_admin_role", "my_user_role"]
}
{
"deleted": [
"my_admin_role",
"my_user_role"
]
}
{
"deleted": [
"my_admin_role"
],
"not_found": [
"not_an_existing_role"
]
}
{
"deleted": [
"my_admin_role"
],
"errors": {
"count": 1,
"details": {
"superuser": {
"type": "illegal_argument_exception",
"reason": "role [superuser] is reserved and cannot be deleted"
}
}
}
}