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:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/Users/update?apikey=[ API Key ]&userId=[id]&userName=[name]&role=[role]&password=[password]

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/Users/update?apikey=[ API Key ]&userId=[id]&userName=[name]&role=[role]&password=[password]

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)
role User group of the new user. (User role of the default 'admin' cannot be changed)
password New password of the user.
oldPassword Old password of the user.
email Email id of the user.
description Description of the user.
associateGroupId Group id of the monitor groups to which the user needs to be associated. The group ids should be comma separated.
associateGroupName Name of a monitor group to which the user needs to be associated. If groupId is provided this parameter will be ignored.
removeGroupId Group id of the monitor group from which the user needs to be removed. The group ids should be comma separated.
removeGroupName Name of a monitor group from which the user needs to be removed. If groupId is provided this parameter will be ignored.

* - All parameters are optional.

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 Response

<AppManager-response uri="/AppManager/xml/users/create"> <result>
<response response-code="4000">
<User email="manager" 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>