Fine-grained permissions via REST API

Hi everyone,

I need a more sophisticated scheme for user management than the current admin UI can offer. I was thinking of not reinventing the wheel and using the fine-grained permission feature. I looked through the REST API and could find everything to build an external application - but probably I missed some of the things.

Is there a way to access the permissions and policies of the realm management through the REST API?
There is GET /{realm}/client-policies/policies, but /Test/client-policies/policies only returns 404 response. Is there anything I need to configure?

Help would be appreciated.