Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Lifery DXP 7.4: getting site role with /o/api services
Hi everyone, I have an user, belonging to a UserGroup and this UserGroup is associated to a site Role.
Using a sequence of Liferay REST API calls, how can I get which site role have my user?
I would like to get my user data, but inside the JSON returned I do not have neither site roles, nor site groups which it belongs to.
Calling the user group API, I do not have the list of users belonging to them, neither roles associated to that group.
Finally, calling the site this user belongs to, there is no reference to site roles.
How to manage this? What is the supposed correct sequence of calls?
Thank you.
Hello Alessandro,
You can try the headless-admin-user API: http://localhost:8080/o/headless-admin-user/v1.0/openapi.yaml
To get the user info, try:
curl "http://localhost:8080/o/headless-admin-user/v1.0/my-user-account" -u "test@liferay.com:test"
or
curl "http://localhost:8080/o/headless-admin-user/v1.0/user-accounts/{accountId}" -u "test@liferay.com:test"
Hope this helps
Powered by Liferay™