How to find projects associated to a particular user Edited

I have to list all projects a user associated to in JIRA ( in which he can create an issue) as a drop down in my application. Is there a way to find that?.
 
Currently the following steps is what I am doing to get it done.
1. Making call to - https://jira.xxx.com/jira/rest/api/2/project
2. From the project lists got as response from #1 for each of those projectKey making a call to below api with  
https://jira.xxx.com/jira/rest/api/2/user/assignable/search?project=XXX
3. if the response for #2 contains the logged in user then it will be shown in drop down.
 
Is this the correct way or is there a better approach for the same.
Thanks in advance
 
 

1 answer

1 votes
Sam Hall Community Champion Apr 21, 2017

You could use: GET /rest/api/2/issue/createmeta

For example, if you make a GET request to:

https://{your-jira-url}/rest/api/2/issue/createmeta

You should get a list of the projects in which the user has permission to create issues.

Sam Hall Community Champion Apr 21, 2017

This assumes that:

  • the user logs into your application.
    and  
  • your application makes the request using the user's credentials.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

600 views 2 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot