The solution for a particular issue is the following
Go to settings and click on USERS & PERMISSIONS PLUGIN and then click on roles. where you will find all the roles. click on any role and then on the bottom click on the role and check to find the endpoint and press save. so now call that API api/users/me?populate=* will show you the user details and Role information