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.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.