taskadapter / redmine-java-api

Redmine Java API
Apache License 2.0
270 stars 163 forks source link

Get Users from group #310

Closed cudu closed 4 years ago

cudu commented 6 years ago

How do I get users from a group?

javiertuya commented 5 years ago

Redmine api allows some optional filters on status, name and group_id, see http://www.redmine.org/projects/redmine/wiki/Rest_Users

This retrieves users by name using the redmine-java-api (givenuserName):

final Map<String,String> params = new HashMap<>();
params.put("name", userName);
final ResultsWrapper<User> users = mgr.getUserManager().getUsers(params);

If params are set as params.put("group_id", groupId), it should retrieve the users that belong to groupId.

cudu commented 5 years ago

thanx alote, helped me.