I am using following REST API to get all the users on our JIRA server, but it never returns any additional record after 1000. There are more than 1000 users on server.
https://jira-server/rest/api/latest/user/search?startAt=0&maxResults=1000&username=.
It returns 1000 records. Then we execute following to get remaining records but we it always returns empty
https://jira-server/rest/api/latest/user/search?startAt=1000&maxResults=50&username=.
Any help on this issue? startAt & maxResults work fine till total record fetched is upto 1000 records, for example following REST call works but returns only 10 records (990 to 1000) even though there are 1100 users on server.
https://jira-server/rest/api/latest/user/search?startAt=990&maxResults=50&username=.
Hey there!
This behavior is from a Bug on Jira, you can find further details on the following bug report issue:
Currently, there are two known workarounds, make the REST call with a wildcard to stream users(check the workaround section in the ticket) or you can get the user information directly from the database in the "cwd_user" table.
Kind regards,
Maurício Karas
Just connect to Jira's database on your script or using a database visualizer or querying tool.
If you don't know which database Jira is using and how to access it, you can check the "dbconfig.xml" file in your Jira home directory. This file contains which database Jira is using, which URL, port, user, etc., this is everything you need to connect to it.
Then you can run a simple select query(note that this can change depending on the database type, SQL Server and Oracle can require you to inform a schema before the table name):
select * from cwd_user;
The query will return all users from Jira, from that you can choose which fields you'll need.
Kind regards,
Maurício Karas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.