Increase the number of users returned by an API request

Serhii Kyrychenko September 29, 2016

How can I increase the number of users returned by a GET API request? The max number is 50 and it is not enough

1 answer

0 votes
Petar Petrov (Appfire)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2016

If you use the REST resource /user/search, you can pass maxResults parameter like this:

GET /rest/api/2/user/search?maxResults=100
Serhii Kyrychenko September 29, 2016

No, it doesn't work. JIRA returns 50 results. This query works

curl -D- -u adminuser:password -H "Content-Type: application/json" -n -X GET -d '{"name":"$USERNAME"}' "http://localhost:8080/rest/api/2/group/member?groupname=[name-of-a-group]&startAt=0[51]&maxResults=50[101]" | tr "," "\n" | grep key >> output4

Though it is VERY unconvenient

 

Rodolfo So May 17, 2019

May i know how do you run this command? and what application did you used? thanks

Suggest an answer

Log in or Sign up to answer