Hi, I want to get all of the users using the Jira Data Center through the rest API for an integration I am developing. I saw that Jira 10 has this limitation. This lead me to trying the following - 1. get all application roles, 2. get the one that has the key "jira-software" and 3. get all of the members of child groups. Will this get all of the users of the Jira DC? Will this key always remain the same, regardless of the language Jira is in or something, or can it be edited?
Hi @Erazem Kos ,
The limitation that you pointed out includes a workaround as well. Would that work for your use case?
https://{baseurl}/rest/api/2/user/search?username=a*&startAt=0&maxResults=100
SELECT user_name, display_name, email_address FROM cwd_user WHERE active = 1 ORDER BY user_name ASC LIMIT 100 OFFSET 0;
No I will not have direct access to the database, so that is out of the question for my use case. The subsets approach is very tough as I don't know how many total users there will be. So for example querying with "a" could match more than 100 users, and then I need to produce sub-queries and deduplicate etc.
Will my proposed solution not get all of the users?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Erazem Kos
You don't need to perform any deduplication.
When you have more than 100 users, you'll need to use pagination. Simply retrieve and parse the user list page by page until you've fetched all results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But that pagination is not working for Jira 10. It gets truncated to 100 users - talking about the v2 user/search API that I linked to in the original post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have installed 10+ Jira for tests. Can you write structure of response here?
Of course without user data arrays.
Just JSON structure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.