getAllUsersDefault method

Future<List<User>> getAllUsersDefault({
  1. int? startAt,
  2. int? maxResults,
})

Returns a list of all users, including active users, inactive users and previously deleted users that have an Atlassian account.

Privacy controls are applied to the response based on the users' preferences. This could mean, for example, that the user's email address is hidden. See the Profile visibility overview for more details.

Permissions required: Browse users and groups global permission.

Implementation

Future<List<User>> getAllUsersDefault({int? startAt, int? maxResults}) async {
  return (await _client.send(
    'get',
    'rest/api/3/users',
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
    },
  ) as List<Object?>)
      .map((i) => User.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}