Forums

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

Is there a more efficient way to fetch the users associated with all projects and issues?

Moxarth Rathod December 22, 2023

Hey Folks,

My use case is to fetch all users associated with all projects and issues present in the Jira software.

Consider having the large data present in the Jira software

Here is the method I am using to fetch permissions for projects:

Fetching project permission is still not a time-consuming task, the real nightmare is to fetch permissions for issues.

I am using the below way to fetch issue permission:

  1. If an issue security scheme is present, I am using /rest/api/2/issue/{issue_key}?fields=security endpoint which returns a security schema applied to the specific issue.
  2. Once, we get the issue security scheme, the next target is for scheme members and that is achieved via https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-schemes/#api-rest-api-3-issuesecurityschemes-level-member-get.
  3. This point is applied if issue security schema is not present/applied for an issue, the parent permission means the project's permission is inherited to the issue.

This is how we fetch the users for issues and it looks simple in the first place. But the problem arrives when there are thousands of issues available in projects, the API calls, in that case, are at peak.

Assuming we have 50 projects and each has 1000 issues then the total API calls for fetching issue permission is 50000 which slows down the resultant code.

Question: Is there a better approach to minimize the API calls or improve this method of fetching users/actors for projects and issues?

1 answer

0 votes
Sunny Ape
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.
December 22, 2023

Hello @Moxarth Rathod 

Nope, there are no 'shortcuts' to getting all the permissions of all the issues of all the projects. If you want extremely granular information from a very large dataset, you have to expect extremely laborious collection thereof.

Just break your query down into batches, add some jitter / delay to avoid hitting the request limits, and then the time it takes will be the time it takes.

Suggest an answer

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

Atlassian Community Events