POST api/UserAccount/Update?username={username}

Updates existing user

Request Information

URI Parameters

NameDescriptionTypeMandatory when
username

Username of user to update

string

Always Required

Body Parameters

UpdateUser
NameDescriptionTypeMandatory when
Name

User First name

string

Surname

User Last name

string

Email

User Email

string

Username

User Username

string

EmployeeNumber

Employee Number

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]

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 MODIFIED",
  "Surname": "Doe",
  "Email": "user@example.com",
  "Username": "user@example.com",
  "EmployeeNumber": "",
  "RolePerModule": {
    "Audit": "ADMINISTRATOR",
    "Delegation": "ADMIN"
  }
}

text/xml

Sample:
<UpdateUser 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 MODIFIED</Name>
  <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>
</UpdateUser>

Response Information

Resource Description

JsonResponseModelOfUpdateUser
NameDescriptionTypeMandatory when
ResponseCode

integer

ResponseMessage

string

Data

UpdateUser

Response Formats

application/json, text/json

Sample:
{
  "ResponseCode": 200,
  "ResponseMessage": "User updated.",
  "Data": {
    "Name": "John",
    "Surname": "Doe",
    "Email": "user@example.com",
    "Username": "user@example.com",
    "EmployeeNumber": "",
    "RolePerModule": {
      "Audit": "ADMINISTRATOR",
      "Delegation": "ADMIN"
    }
  }
}

text/xml

Sample:
<JsonResponseModelOfUpdateUserCyyWUdKo 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: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 updated.</ResponseMessage>
</JsonResponseModelOfUpdateUserCyyWUdKo>

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