Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to find all the project leads in jira server through jira api?

Santwana Sarangi {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2018

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

1 answer

2 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2018

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.

Konstantin Gapich
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2018

Or you can just send:
`/rest/api/2/project?expand=lead`

Like • 11 people like this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

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!
AUG Leaders

Atlassian Community Events