Enables you to create a new MACRO user.
This supersedes the original Web API call.
You must include an authorization token in this request which is generated from the /token call.
http://localhost/MACRORESTAPI/api/users/createuser
POST
You must include these parameters in the body of the call:
Parameter |
Type |
Description |
userid |
string |
User name for new user |
password |
string |
Temporary password for new user (must comply with password policy) |
fullname |
string |
Full name for new user |
adminuser |
string |
The system administrator who is to be responsible for dealing with forgotten passwords for the new user (may be left blank) |
string |
Email address for new user (may be left blank) | |
isadmin |
boolean |
True to assign system administrator status, False to create as standard user |
This example uses the RestSharp library.
Creating a new user Bob Jones:
|
The result code is returned:
Success |
Value |
Description |
Success |
The operation was successful |
PermissionDenied |
The current user does not have the relevant MACRO permissions to perform the action |
InvalidUserName |
The given user name is not valid, e.g. it contains invalid characters, too many characters or is empty |
InvalidFullName |
The given user full name is not valid, e.g. it contains invalid characters, too many characters or is empty |
InvalidPassword |
The specified password is not valid, e.g. it is empty or does not comply with the current Password Policy |
InvalidEmail |
The specified email address is not valid, e.g. it contains invalid characters, too many characters or does not contain the "@" character or a dot after the @ |
UserExists |
User already exists, when attempting to create a user |
UserNotFound |
User does not exist, when attempting to specify the system administrator for a user |
Unknown |
An unknown error occurred |