I need to list all users who are lead of one or more projects in Jira server using Jira API.
For example,
There two projects in the Jira server projA and projB and userA and userB are the project leads of projA and projB respectively, then the result should return a list containing userA and userB
If you want to user REST API then you should:
1. Get all projects with GET /rest/api/2/project
https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-project-get
2. Iterate over all projects and get component lead for each project GET /rest/api/2/project/{projectIdOrKey}
https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-project-projectIdOrKey-get
If you want to use Java API then
1. Get all projects
ComponentAccessor.getProjectManager().getAllProjectKeys()
2. Get component Lead for each project with getProjectLead() function.
Or you can just send:
`/rest/api/2/project?expand=lead`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.