Search content of .opendistro_security index

Good day,

I am trying to search the content of the “.opendistro_security” index, in particular I am trying to search for specific roles that start with a prefix. Unfortunately the " GET _opendistro/_security/api/roles/" retrieve all the available roles.

Currently I have a requirement to synchronize opendistro elasticsearch with roles defined an external system (not LDAP). I will be basically replicating the external roles into opendistro elasticsearch. It will be usefully to search the content of “.opendistro_security” index such as roles and rolemappings.

Appreciate your help.