(moved from https://community.atlassian.com/t5/Confluence-questions/How-can-we-fetch-all-the-groups-via-JIRA-Cloud-REST-API/qaq-p/806298, as I created wrong place)
I'm planning to develop a tool to manage Atlassian Groups via JIRA REST API.
To achieve that I believe I need to use group/picker API call found in REST documentation.
I'm trying to use this API and I receive only 20 groups in one response;
Response to /rest/api/2/groups/picker
=> {"header"=>"Showing 20 of 25 matching groups",
"total"=>25,
"groups"=>
[{"name"=>"a..b..c", "html"=>"a..b..c", "labels"=>[]},
{"name"=>"a.b.c", "html"=>"a.b.c", "labels"=>[]},
{"name"=>"aaa=bbb", "html"=>"aaa=bbb", "labels"=>[]},
{"name"=>"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", "html"=>"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", "labels"=>[]},
{"name"=>"administrators", "html"=>"administrators", "labels"=>[{"text"=>"Admin", "title"=>"Users added to this group will be given administrative access", "type"=>"ADMIN"}, {"text"=>"JIRA Core", "title"=>"Users added to this group will be given access to <strong>JIRA Core</strong>", "type"=>"SINGLE"}]},
{"name"=>"atlassian-addons-admin", "html"=>"atlassian-addons-admin", "labels"=>[{"text"=>"Admin", "title"=>"Users added to this group will be given administrative access", "type"=>"ADMIN"}, {"text"=>"JIRA Core", "title"=>"Users added to this group will be given access to <strong>JIRA Core</strong>", "type"=>"SINGLE"}]},
{"name"=>"confluence-users", "html"=>"confluence-users", "labels"=>[]},
(snip)The document says it accepts maxResults but doesn't say startAt, which should be mandatory for pagenated request. (I just tried by specifying startAt in query parameter but it did not take effect)
I could specify 100 for example as maxResults and it just worked, but maxResults should have naturally a limitation, that is undocumented.
The document says
The number of groups returned is limited by the system property “jira.ajax.autocomplete.limit”
but it seems to apply for JIRA Server, not Cloud.
Is there any limitation for maxResults or undocumented way to pagenated request?