addUser method

Future<DynamiteResponse<UsersAddUserResponseApplicationJson, void>> addUser({
  1. required String userid,
  2. String? password,
  3. String? displayName,
  4. String? email,
  5. BuiltList<String>? groups,
  6. BuiltList<String>? subadmin,
  7. String? quota,
  8. String? language,
  9. String? manager,
  10. bool? oCSAPIRequest,
})

Create a new user.

This endpoint requires password confirmation.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • userid ID of the user.
  • password Password of the user. Defaults to "".
  • displayName Display name of the user. Defaults to "".
  • email Email of the user. Defaults to "".
  • groups Groups of the user. Defaults to [].
  • subadmin Groups where the user is subadmin. Defaults to [].
  • quota Quota of the user. Defaults to "".
  • language Language of the user. Defaults to "".
  • manager Manager of the user.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: User added successfully
  • 403: Missing permissions to make user subadmin

See:

Implementation

Future<_i1.DynamiteResponse<UsersAddUserResponseApplicationJson, void>> addUser({
  required String userid,
  String? password,
  String? displayName,
  String? email,
  BuiltList<String>? groups,
  BuiltList<String>? subadmin,
  String? quota,
  String? language,
  String? manager,
  bool? oCSAPIRequest,
}) async {
  final _request = $addUser_Request(
    userid: userid,
    password: password,
    displayName: displayName,
    email: email,
    groups: groups,
    subadmin: subadmin,
    quota: quota,
    language: language,
    manager: manager,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _response = await _rootClient.httpClient.send(_request);

  final _serializer = $addUser_Serializer();
  final _rawResponse =
      await _i1.ResponseConverter<UsersAddUserResponseApplicationJson, void>(_serializer).convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}