Forums

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

Getting the user groups for all projects via the API.

Harry Krautschneider
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!
April 12, 2021

Hi, I've been tasked with creating a script that will check each project for their individual user groups, and if a particular user group is within that project then do something with that project, whatever that may be, not relavent here.

 

My current solution is recursively step through the paginated projects and check each individual project with an API call each against that specific role, this is slow and hitting rate limiting blocks. Not overly an issue as I could always add some time between the requests, albeit slowing the execution down, but would like to check if there is a better method of acheiving this first before making that step.

 

Let me know if you require more information

Many thanks!

1 answer

0 votes
Prince Nyeche
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.
April 12, 2021

Hi @Harry Krautschneider 

Groups are added to project roles, so are you checking the roles used by users on the project or you're keen on the roles or groups on the permission scheme? Although for any API call to Jira, it is good you limit your request to 2 concurrency per minute as you won't be able to increase it any further even if you tried as there are rate limiters on cloud instances to avoid disruption of services.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events