Add programmatic refresh capability to the License Count API endpoin

XMLWordPrintable

    • 1

      Issue Summary
      The /rest/license/1.0/userCount API endpoint returns stale license usage data and requires a manual UI refresh to update.

      Steps to Reproduce

      1. Perform a user cleanup in Confluence (e.g., disable or remove several active users to change the license count).
      1. Call the License Count API endpoint: GET /rest/license/1.0/userCount.
      1. Observe the userCount value returned in the JSON response.
      1. Navigate to Administration > Users & Security > License Details in the Confluence UI.
      1. Click the Refresh button next to the user count.
      1. Call the API endpoint GET /rest/license/1.0/userCount again.

      Expected Results
      The API should return the most up-to-date license count immediately after users are modified, or provide a programmatic way (such as a query parameter) to force a refresh of the cached data.

      Actual Results
      The API returns cached (stale) data from before the cleanup. The count only updates after an administrator manually triggers a refresh through the Confluence UI.

      Workaround
      To get an accurate count without manual UI intervention, administrators can use one of the following:
        # Database Query: Query the database directly to count active users. SQL examples can be found in [How to get a list of active users counting towards the Confluence license | Confluence | Atlassian Documentation|https://confluence.atlassian.com/confkb/how-to-get-a-list-of-active-users-counting-towards-the-confluence-license-298978076.html].

      1. Cache Flush: Flush the Confluence cache via Admin > Cache Statistics > Flush All, though this may have temporary performance implications for the instance.
         
         

              Assignee:
              Unassigned
              Reporter:
              Srinatha Tondihal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: