POST api/UserAccount/Add
Adds a new user
Request Information
URI Parameters
None.
Body Parameters
User| Name | Description | Type | Mandatory when |
|---|---|---|---|
| Name |
User First name |
string |
Always Required |
| Surname |
User Last name |
string |
Always Required |
|
User Email |
string |
Always Required |
|
| Username |
User Username |
string |
Always Required |
| EmployeeNumber |
Employee Number |
string | |
| OldUsername |
Old Username |
string | |
| RolePerModule |
Define which role will user have in which module in following format: "Module name": "Role in module" |
Dictionary of string [key] and string [value] | |
| Positions |
Positions For User |
Collection of string |
Available Roles
| Module | Roles |
|---|---|
| Audit |
LIMITED USER, STANDARD USER, BASIC USER, SUPER USER, ADMINISTRATOR |
| Authorisation |
STANDARD USER, ADMINISTRATOR |
| Compliance |
LIMITED USER, STANDARD USER, BASIC USER, SUPER USER, ADMINISTRATOR |
| Delegation |
STANDARD, AUTHORITY, ADMIN |
| LexisNexis |
LIMITED USER, BASIC USER, SUPER USER, ADMINISTRATOR |
| Monitor |
LIMITED USER, BASIC USER, SUPER USER, ADMINISTRATOR |
| Risk |
LIMITED USER, STANDARD USER, BASIC USER, SUPER USER, ADMINISTRATOR |
| Incident |
None (Access to Incident is determined by access to Risk) |
Request Formats
application/json, text/json
Sample:
{
"Name": "John",
"Surname": "Doe",
"Email": "user@example.com",
"Username": "user@example.com",
"EmployeeNumber": "",
"OldUsername": "",
"RolePerModule": {
"Audit": "ADMINISTRATOR",
"Delegation": "ADMIN"
},
"Positions": null
}
text/xml
Sample:
<User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QAP.API.ModelsForClient">
<Email>user@example.com</Email>
<EmployeeNumber></EmployeeNumber>
<Name>John</Name>
<OldUsername></OldUsername>
<Positions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<RolePerModule xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>Audit</d2p1:Key>
<d2p1:Value>ADMINISTRATOR</d2p1:Value>
</d2p1:KeyValueOfstringstring>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>Delegation</d2p1:Key>
<d2p1:Value>ADMIN</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</RolePerModule>
<Surname>Doe</Surname>
<Username>user@example.com</Username>
</User>
Response Information
Resource Description
JsonResponseModelOfUser| Name | Description | Type | Mandatory when |
|---|---|---|---|
| ResponseCode | integer | ||
| ResponseMessage | string | ||
| Data | User |
Response Formats
application/json, text/json
Sample:
{
"ResponseCode": 200,
"ResponseMessage": "User added.",
"Data": {
"Name": "John",
"Surname": "Doe",
"Email": "user@example.com",
"Username": "user@example.com",
"EmployeeNumber": "",
"OldUsername": "",
"RolePerModule": {
"Audit": "ADMINISTRATOR",
"Delegation": "ADMIN"
},
"Positions": null
}
}
text/xml
Sample:
<JsonResponseModelOfUserCyyWUdKo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RGS.API.Models">
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/QAP.API.ModelsForClient">
<d2p1:Email>user@example.com</d2p1:Email>
<d2p1:EmployeeNumber></d2p1:EmployeeNumber>
<d2p1:Name>John</d2p1:Name>
<d2p1:OldUsername></d2p1:OldUsername>
<d2p1:Positions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<d2p1:RolePerModule xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>Audit</d3p1:Key>
<d3p1:Value>ADMINISTRATOR</d3p1:Value>
</d3p1:KeyValueOfstringstring>
<d3p1:KeyValueOfstringstring>
<d3p1:Key>Delegation</d3p1:Key>
<d3p1:Value>ADMIN</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:RolePerModule>
<d2p1:Surname>Doe</d2p1:Surname>
<d2p1:Username>user@example.com</d2p1:Username>
</Data>
<ResponseCode>200</ResponseCode>
<ResponseMessage>User added.</ResponseMessage>
</JsonResponseModelOfUserCyyWUdKo>
Error Response Causes
- Invalid API credentials
- Another user with same email address already exists
- Another user with same username already exists
- An invalid role is specified for a module
- Duplicate employee numbers not allowed