user/update

Updates an existing user.

Only administrators are allowed to update any property of any user. User-level accounts can only change their own password and data fields.

Authorization

Access JSON Web Token (UpdateCurrentUser)

Request Topic and Payload

Topic

dh/request

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "userId": {integer},
    "user": {
        "login": {string},
        "role": {integer},
        "status": {integer},
        "password": {string},
        "data": {object},
        "introReviewed": {boolean}
        
    }
}

Payload Parameters

Property Name

Required

Type

Description

action

Yes

string

Action name: user/update

requestId

No

object

Request unique identifier, will be passed back in the response message.

userId

Yes

integer

User identifier. Use the 'current' keyword to update information of the current user.

user

Yes

object

User object

user.login

No

string

User login using during authentication.

user.role

No

integer

User role. Available values:
0: Administrator role
1: Client role

user.status

No

integer

User status. Available values:
0: The user is active
1: The user has been locked out due to invalid login attempts
2: The user has been disabled

user.data

No

object

User data, a JSON object with an arbitrary structure.

user.password

No

string

User new password

user.data

Yes

object

User data, a JSON object with an arbitrary structure.

user.introReviewed

No

boolean

Indicates if user reviewed an intro.

Response Topic and Payload

Topic

dh/response/user/[email protected]{clientId}

Payload Representation

{
    "action": {string},
    "requestId": {object},
     "status": {string}
}

Payload Parameters

Property Name

Type

Description

action

string

Action name: user/update

requestId

object

Request unique identifier, will be passed back in the response message.

status

string

Operation execution status (success or error).