You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
HI Team,
I am consuming JIRA Rest API V2. In that i want to fetch all the roles by pasisng user name/id.
GET /rest/api/2/user -> this method is not fetching the roles.
Could you help to get the correct api that will return all roles based on user.?
Thanks,
Loganayaki
Hello @Loganayaki
You cannot get project roles based on a user, only actors (users) based on a project role, which is done via the Get project role actors for role endpoint.
Hi @David Bakkers ,
Thanks for your quick response. is there any way to get user roles by using below api?
GET /rest/api/2/user
It shows application roles in API result. but values are not shown.
Thanks,
Loganayaki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The values aren't shown, because the applicationRoles element needs to be expanded. When you look at the response from the REST API, that information is provided:
"expand": "groups,applicationRoles"
If you expand the applicationRoles element, you will get all the items within it. In the case you've shown above, there is one (1) item inside the items array.
Review the resulting data and determine for yourself if it does or doesn't satisfy what you consider to be 'roles' for that user.
Good luck on your learning journey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.