Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-78660

Enhance Jira 10's User Search Endpoint to Return more than 100 Results

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • REST API
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      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:

      1. 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
        
      1. 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.
        1. How to list all Users and Groups in Jira
        2. Get the list of licensed users in the Jira Server and Data Center

       

            [JRASERVER-78660] Enhance Jira 10's User Search Endpoint to Return more than 100 Results

            There are no comments yet on this issue.

              Unassigned Unassigned
              a043f042db56 Jose Filho
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: