Enables you to create a new MACRO user.
This is also available as a RESTful API call.
You must include an authorization token in this request which is generated from the /token call.
https://localhost/webapi/api/users
POST
The following are passed as BODY parameters:
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 |
Creating a new user Bob Jones:
{ "userId": "bobj", "password": "he(26gp2s", "fullname": "Bob Jones", "adminuser": "daveop", "email": bob.jones@gmail.com", "isadmin": false, } |
The result code is returned:
<APIResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/InferMed.M40.WebAPI.Models"> <message>Success</message> <resultCode>Success</resultCode> </APIResponseModel> |
Message |
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 |