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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.