-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Problem Statement
Jira's User Search Endpoint has changed in Jira 10 and now the results are limited to a maximum to 100 users regardless of additional parameters included in the API call.
Summary:
In Jira 9, one could use Jira's User Search Endpoint, with various parameters, and collect up to 1000 results per request, and increment the results based on pagination via the startAt parameter.
In Jira 10, this changed and results are limited to 100 records. Additional parameters are not allowing the results to change, or paginate, which negatively impacts integrations relying on this endpoint.
Relevant Data
This was originally documented in JRASERVER-78520. It was determined not a bug, but a legitimate change due to performance reasons:
The current behaviour of the endpoint, which returns a maximum of 100 users, is indeed correct and was an intentional change made to enhance performance and stability; therefore, we're closing this as not a bug.
For now, please refer to the parameter maxResults, as documented in the code. This parameter indicates a default of 50 and a maximum of 100 users. If a higher value is specified, the results are truncated.
@Parameter(name = "maxResults", description = "The maximum number of users to return (defaults to 50). The maximum allowed value is 100 (The combination of maxResults and startAt is limited to the first 100 results). If you specify a value that is higher than this number, your search results will be truncated. If you send a request with startAt=98 and maxResults=20, it will only return 2 users.")
Customer Impact
This has high impact on customers who are accustomed to using this endpoint with parameters. Since making this change in Jira 10, the integrations that rely on this endpoint are effectively broken.
Work Around:
- Use Username Filters to Fetch Subsets of Users
By applying filters to the username parameter, you can retrieve smaller subsets of users and manually aggregate the results. For example:https://{baseurl}/rest/api/2/user/search?username=a*&startAt=0&maxResults=100
- Query the Jira Database Directly
If direct access to the Jira database is available, the customer can query the cwd_user table to retrieve all users.
- is caused by
-
JRASERVER-78520 Executing a search request on the /rest/api/2/user/search endpoint with startAt and maxResults parameters has a result of returning a maximum of 100 users and failing to paginate beyond the first 100 users
-
- Closed
-