Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API return group members

Roy Chapman
Contributor
November 3, 2014

I am executing the following REST API call

/usr/bin/curl -k -s -u admin:xxxx 'http://a100-1441-186e.ldn.swissbank.com:8080/rest/api/2/group?groupname=jira-users&expand=users\[0:100000\]'

For some reason it will only return the first 50 group members and no more.  Do others get the same issue?

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
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.
November 3, 2014

That is expected. You have to use pagination to get more users. See https://docs.atlassian.com/jira/REST/latest/#d2e1951

You can page through users list by using indexes in expand param. For example to get users from index 10 to index 15 use "users[10:15]" expand value. This will return 6 users (if there are at least 16 users in this group). Indexes are 0-based and inclusive.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events