Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×I am writing a bash script (attached it the script snippet). I was able to pull the crowd groups, but I want to also be able to pull all users within those groups as well. Is there a way to do so?
curl -s -k -u test:west \
-H "Accept: application/json" \
"https://crowd-dev-gc.nasawestprime.com/crowd/rest/usermanagement/latest/search?entity-type=group" \
| jq -r '.groups[].name' > groups_only.csv
Hi @haneen.m.elsaad - I would recommend the atlassian-python-api library, where you first fetch all members of a group and then loop through each member to retrieve their details.
https://atlassian-python-api.readthedocs.io/crowd.html
# Get group's members
crowd.group_members(group, kind='direct', max_results=99999)
# Get user
crowd.user(username)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.