Get list of users by role / attribute over API


I would like to know if there’s a way to retrieve users by role and attribute using the elastic API ? And how the best secured way to do this.

The idea behing is to save in the user attributes, for each user, the best way to send a warning if an alert is triggere. I don’t want to duplicate the users database (i use webhook for alerting).

best regards,

Hi @Olivier, would you be able to provide some more clarifying details regarding what you want to do? What is the scenario you want to accomplish and what steps are you trying? Thanks!