My question is how to list only projects, the currently logged on user (logged in with Jira REST API /auth/1/session POST Request) is working on. (The projects that contains issues they are assigned to.) I use the Jira REST API to request all other information I need.
I need to display only those projects so I can choose a project to e.g. log time on an issue it contains (so the user only gets those projects that are relevant in that case).
I already read a similar question about this (https://community.atlassian.com/t5/Answers-Developer-Questions/List-of-users-in-project-REST-API/qaq-p/536820) but this seems a little too much for what I want to achieve. As I want to use this in a mobile app, I try to limit requests to the minimum.
This article didn't provide a solution I could implement either (https://community.atlassian.com/t5/Answers-Developer-Questions/JIRA-Rest-API-Get-all-projects-filtered-by-Creator-Reporter/qaq-p/488815) which is why I decided to ask myself.
I am using Java and Retrofit for connecting with the API.
Is there a request or how can I access this information easily?
Thank you very much in advance!
I ended up using a jql search
search?jql=assignee=currentuser()
which responds with all issues the current user is assigned to - from there I can retrieve the projects the issues are belonging to and also, if required, limit fields according to my needs.
Thanks a lot for the help! :)
Hi @KerKla ,
If you want to list the projects you have access (as user), I think "https://[YourURL]/rest/api/latest/issue/createmeta" should answer. Go to the projects list and only accessible projects are listed.
Hope it helps !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Thanks, I tested it, but I still get all projects has access to not only the ones he is working on (allowed to track time on an issue in it, assigned to it, etc) which is what I want to have.
Is there another possibility?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.