How get permissions for a role through rest API?

A user have multiple roles, And he can act in any of these roles (one at a time). he can change it from application using a role selector. So I would like to get the permissions for each roles through API, Or is there any way to soft switching a role?.
Now I get the all permissions for the corresponding user using the token endpoint But I don’t getting the permission for each a role.

2 Likes