Lifery DXP 7.4: getting site role with /o/api servicesLifery DXP 7.4: getting site role with /o/api serviceshttps://liferay.dev/c/message_boards/find_thread?p_l_id=119785333&threadId=1214161062024-03-28T22:34:48Z2024-03-28T22:34:48ZRE: Lifery DXP 7.4: getting site role with /o/api servicesJose Luis Bangohttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1214389912022-06-06T16:15:02Z2022-06-05T11:17:44Z<p>Hello Alessandro,</p>
<p>You can try the headless-admin-user API: <strong>http://localhost:8080/o/headless-admin-user/v1.0/openapi.yaml</strong></p>
<p>To get the user info, try: </p>
<blockquote>
<p>curl
"http://localhost:8080/o/headless-admin-user/v1.0/my-user-account"
-u "test@liferay.com:test"</p></blockquote>
<p>or</p>
<blockquote>
<p>curl
"http://localhost:8080/o/headless-admin-user/v1.0/user-accounts/{accountId}"
-u "test@liferay.com:test"</p></blockquote>
<p>Hope this helps</p>
<p> </p>Jose Luis Bango2022-06-05T11:17:44ZLifery DXP 7.4: getting site role with /o/api servicesAlessandro Candinihttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1214161052022-05-06T08:58:22Z2022-05-06T08:49:02Z<p>Hi everyone, I have an user, belonging to a UserGroup and this
UserGroup is associated to a site Role.</p>
<p>Using a sequence of Liferay REST API calls, how can I get which site
role have my user?</p>
<p>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.</p>
<p>Calling the user group API, I do not have the list of users belonging
to them, neither roles associated to that group.</p>
<p>Finally, calling the site this user belongs to, there is no reference
to site roles.</p>
<p>How to manage this? What is the supposed correct sequence of calls?</p>
<p>Thank you.</p>