I have role mapping created like the following:
PUT {{es_ip_port}}/_security/role_mapping/dummy_1
{
"enabled": true,
"roles": [
"client_role",
"kibana_dashboard_only_user"
],
"rules": {
"all": [
{
"field": {
"realm.name": "oidc1"
}
},
{
"field": {
"username": [
"dummy_user@dummy.com"
]
}
}
]
}
}
Similarly I have more role-mappings created with role_mapping name dummy_2
, dummy_3
, etc.
I want to delete all the role mappings starting with the name, dummy_
like dummy_*
. Is there any way to do it over DELETE API at one shot like below:
DELETE {{es_ip_port}}/_security/role_mapping/dummy_*
I do not want to delete the role mappings one by one. Is there any way? Please help.