Public
Occasional Contributor

Query users's role

Hi guys

I am using the following query to get user's role, but it returns nothing, I am sure this user has roles, I have tried different user id.

https://api.lithium.com/community/2.0/yutwg22796/search?q=SELECT * FROM roles where users.id%3D'30'

//30 is the user id. 

the response is:

{
"status": "success",
"message": "",
"http_code": 200,
"data": {
"type": "roles",
"list_item_type": "role",
"size": 0,
"items": []
},
"metadata": {}
}

 

Regards

Shong

3 Replies 3
Honored Contributor

Have you tried the V1 api instead for roles?

Varun : Weaving magic with Khoros!

Recent Ideas: Advanced Private Messages | Rewarding Module | Badges for Threads

No, I have never tried V1 API, I am using V2.

@TalendCommunity - You should try the V1 and V2 for the same user to confirm if they both return same results or different.

Varun : Weaving magic with Khoros!

Recent Ideas: Advanced Private Messages | Rewarding Module | Badges for Threads

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.