getUsersFromGroup method

Future<PageBeanUserDetails> getUsersFromGroup({
  1. String? groupname,
  2. String? groupId,
  3. bool? includeInactiveUsers,
  4. int? startAt,
  5. int? maxResults,
})

Returns a paginated list of all users in a group.

Note that users are ordered by username, however the username is not returned in the results due to privacy reasons.

Permissions required: Administer Jira global permission.

Implementation

Future<PageBeanUserDetails> getUsersFromGroup(
    {String? groupname,
    String? groupId,
    bool? includeInactiveUsers,
    int? startAt,
    int? maxResults}) async {
  return PageBeanUserDetails.fromJson(await _client.send(
    'get',
    'rest/api/3/group/member',
    queryParameters: {
      if (groupname != null) 'groupname': groupname,
      if (groupId != null) 'groupId': groupId,
      if (includeInactiveUsers != null)
        'includeInactiveUsers': '$includeInactiveUsers',
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
    },
  ));
}