h3. Issue Summary
When pagination(start, limit parameter) is used in a GET /rest/api/user/list REST API call, duplicate users are observed.
This is reproducible on Data Center: yes
h3. Steps to Reproduce
{code:java}
% curl -s --header ‘Accept: application/json’ -u <username:password> ‘<confluence-base-url>/rest/api/user/list?start=0&limit=5’|jq|egrep ‘username|next|prev’{code}
{code:java}
% curl -s --header ‘Accept: application/json’ -u <username:password> ‘<confluence-base-url>/rest/api/user/list?start=5&limit=5’|jq|egrep ‘username|next|prev’ {code}
For example, if there are 100 distinct users in a Confluence instance, and we use start as 0 and limit as 10, then we choose to get the 100 users in a batch of 10. In total, we have to run the curl command 10 times. But these 10 iterations will have duplicate users, so all 100 distinct users will not be retrieved.
h3. Expected Results
h3. Actual Results
curl -s --header ‘Accept: application/json’ -u <username:password> ‘<confluence-base-url>/rest/api/user/list?start=5&limit=5’|jq|egrep ‘username|next|prev’
“username”: “EasaW”,
“username”: “FourD”,
“username”: “Administrator”,
“username”: “Sapter”,
“username”: “Canter”,
“next”: “/rest/api/user/list?limit=5&start=10”,
“prev”: “/rest/api/user/list?limit=5&start=0”,
{code}
h3. Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available.
CPE | Name | Operator | Version |
---|---|---|---|
confluence data center | le | 8.5.9 | |
confluence data center | le | 8.5.11 | |
confluence data center | le | 8.9.3 | |
confluence data center | le | 7.19.24 |