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 vote
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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
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