Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


api:user:update

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

api:user:update [2014/09/25 14:40] (current)
sasha Page moved from 1.8:api:user:update to api:user:update
Line 1: Line 1:
 +===== update() =====
 +Available since version: **1.8**\\
 +The method is used to control all user attributes including user group linkage. The method is available only to super admins.
  
 +==== Parameters ====
 +^Parameter^Type^Optional^Description^Details^
 +|**userid**|//​string//​| ​ |User ID. | |
 +|**user attribute**|//​any//​| Yes |New value for a user attribute. ​ | |
 +|**usrgrps**|//​any//​| Yes |New list of user groups. ​ | |
 +
 +==== Returns =====
 +^Parameter^Description^
 +|**result**|Operation successful. Result will contain array of updated User IDs.|
 +|**error**|In case of any errors|
 +
 +==== Example =====
 +Rename user, .i.e set its name to 'New user name':
 +
 +<​code>​
 +  {
 +   "​jsonrpc":"​2.0",​
 +   "​method":"​user.update",​
 +   "​params":​{
 +      "​userid":​ "​100100000010092",​
 +      "​name":​ "New user name"
 +   },
 +   "​auth":"​700ca65537074ec963db7efabda78259",​
 +   "​id":​2
 +  }
 +</​code>​
 +
 +Retrieved updated user IDs:
 +
 +<​code>​
 +  {
 +   "​jsonrpc":"​2.0",​
 +   "​result":​ {
 +       "​userids":​["​100100000010092"​]
 +   },
 +   "​id":​2
 +  }
 +</​code>​