addUser method
Create a new user.
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 totrue
.
Status codes:
- 200: User added successfully
- 403: Missing permissions to make user subadmin
See:
- addUserRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
Implementation
Future<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 rawResponse = addUserRaw(
userid: userid,
password: password,
displayName: displayName,
email: email,
groups: groups,
subadmin: subadmin,
quota: quota,
language: language,
manager: manager,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}