Is there any api to update role mapping user such that it appends to the array of users. till now i can only find a api that would patch the whole array.
PATCH _opendistro/_security/api/rolesmapping/<role>
[
{
"op": "replace", "path": "/users", "value": ["userA", "userB", "userC"]
}
]```
so at some point later i need to add userD. i need to get the existing list and add userD.
i was expecting a idempotent way to add a user to rolemapping such that i do not have to care about the existing list that has the role mapping.
{“statusCode”:400,“error”:“Bad Request”,“message”:“[request query.method]: Method must be one of, case insensitive [‘HEAD’, ‘GET’, ‘POST’, ‘PUT’, ‘DELETE’]. Received ‘PATCH’.”}
Maybe Patch is not accepted.
Need to know how to update the role without over writing the previous values