getUser method

Future<User> getUser({
  1. required String accountId,
  2. List<String>? expand,
})

Returns a user. This includes information about the user, such as the display name, account ID, profile picture, and more. The information returned may be restricted by the user's profile visibility settings.

Note: to add, edit, or delete users in your organization, see the user management REST API.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

Implementation

Future<User> getUser(
    {required String accountId, List<String>? expand}) async {
  return User.fromJson(await _client.send(
    'get',
    'wiki/rest/api/user',
    queryParameters: {
      'accountId': accountId,
      if (expand != null) 'expand': expand.map((e) => e).join(','),
    },
  ));
}