Forums

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

Does Jira API get the users and groups that the Project contain?

Lai Tat Ming_ Ray
Contributor
August 26, 2024

Is there API to get the users and groups in the project setting "people".

I study the Jira cloud API (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-projectidorkey-get). but seem only have project lead.

1 answer

1 accepted

0 votes
Answer accepted
Shreeja J
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.
August 27, 2024

Hello @Lai Tat Ming_ Ray

The Jira Cloud API does not directly provide an endpoint specifically for retrieving users and groups listed in the "People" section of a project's settings. While the API can retrieve details such as the project lead using the endpoint you mentioned, it doesn't offer a built-in method to get the complete list of users and groups associated with a project in the "People" section.

To work around this, you can use a combination of API calls:

  1. Get Project Roles: Retrieve the roles associated with the project using the /rest/api/3/project/{projectIdOrKey}/role endpoint.
  2. Get Role Details: For each role, use the /rest/api/3/project/{projectIdOrKey}/role/{id} endpoint to get the users and groups assigned to that role.

This approach will give you the information you're looking for, even though it's not available through a single API endpoint

Thanks,
Shreeja J

Lai Tat Ming_ Ray
Contributor
August 27, 2024

Hi @Shreeja J ,

Yes, I try to call those APIs manually. I need to call API for each role to get the "People" section list. It can finally get the users and groups.

But it is a way to get "People" section. 

Thank you for the solution.

Thanks,

Ray

 

Like Shreeja J likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events