Update User API


This API will allow an admin user to edit the information of all users, whereas other users will be able to change their own password and email address.

Syntax

For XML Response:

https://[HOST]:[PORT]/AppManager/xml/Users/update?apikey=[API Key]&userId=[id]&userName=[NAME]&role=[ROLE]&password=[PASSWORD]&email=[EMAIL]

For JSON Response:

https://[HOST]:[PORT]/AppManager/json/Users/update?apikey=[API Key]&userId=[id]&userName=[NAME]&role=[ROLE]&password=[PASSWORD]&email=[EMAIL]

Supported HTTP methods: POST

Allowed roles: Administrator

Request Parameters for Admin Users

Field Description        
userId ID of the user to be updated. In case this info is not provided, the particular APIs owner ID will be taken by default.
userName The user name of the user. (User name of the default 'admin' cannot be changed)
oldUserName (optional) Old username of the user.
password New password of the user.
oldPassword (optional) Old password of the user.
role Role of the user to be updated. Possible values are OPERATOR, MANAGER, ADMIN, USER, DELEGATEDADMIN. (Role of the default 'admin' cannot be changed)
description (optional) Description of the user.
email Email id of the user.
associateGroupId (optional) Group ID of the monitor groups to which the user needs to be associated. The group ids should be comma separated.
associateGroupName (optional) Name of a monitor group to which the user needs to be associated. If associateGroupId is provided this parameter will be ignored.
associateUsergroupId (optional) Group ID of the monitor groups to which the user needs to be associated. The user group IDs should be comma separated.
associateUsergroupName (optional) Name of the user group to which the user needs to be associated. If associateUsergroupId is provided this parameter will be ignored.
removeGroupId (optional) Group ID of the monitor group from which the user needs to be removed. The group IDs should be comma separated.
removeGroupName (optional) Name of a monitor group from which the user needs to be removed. If removeGroupId is provided this parameter will be ignored.

Request Parameters for Normal Users

Field Description        
password New password of the user.
oldPassword Old password of the user (This parameter is mandatory to update the password).
email Email id of the user.

Sample Request

https://apm-prod-server:8443/AppManager/xml/Users/update?apikey=aaaaaabbbbbbccccccddddddeeeeee&userId=6&userName=admin&role=MANAGER&password=appman&example@example.com

Sample Response

<AppManager-response uri="/AppManager/xml/users/create"> <result>
<response response-code="4000">
<User email="example@example.com" userId="6" description="manager" userName="manager" role="MANAGER">
<AssociatedGroups groupId="10000035" groupName="Applications Manager"/>
<AssociatedGroups groupId="10000037" groupName="mg1"/>
<AssociatedGroups groupId="10000038" groupName="mg2"/>
</User>
</response>
</result>
</AppManager-response>