Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get currently logged in user project names using jira rest API

pushkar pn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 24, 2020

I need list of all projects for a user who is logged-in, in jira cloud. I've tried following options. But it gives me detail of all projects but not for a particular user.

  • GET /rest/api/3/project  
  • GET /rest/api/3/project/search 

1 answer

0 votes
Dibyandu Roy
Contributor
August 25, 2020

We have the similar query for JDC with MSSQL. I have not tried the API but I explored the DB query and found this one useful. This list all the projects which a user have access to. You need to put the user-id of the user in the 2nd last line.

 

select * from project where id in(

SELECT DISTINCT PID

FROM projectroleactor

WHERE PROJECTROLEID =10000

AND ROLETYPE LIKE 'atlassian-group-role-actor'

AND ROLETYPEPARAMETER IN

(

SELECT DISTINCT parent_name FROM cwd_membership WHERE child_name LIKE '<userid>'

))

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events