Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

api:user:update

Table of Contents

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

ParameterTypeOptionalDescriptionDetails
useridstring User ID.
user attributeany Yes New value for a user attribute.
usrgrpsany Yes New list of user groups.

Returns

ParameterDescription
resultOperation successful. Result will contain array of updated User IDs.
errorIn case of any errors

Example

Rename user, .i.e set its name to 'New user name':

  {
   "jsonrpc":"2.0",
   "method":"user.update",
   "params":{
      "userid": "100100000010092",
      "name": "New user name"
   },
   "auth":"700ca65537074ec963db7efabda78259",
   "id":2
  }

Retrieved updated user IDs:

  {
   "jsonrpc":"2.0",
   "result": {
       "userids":["100100000010092"]
   },
   "id":2
  }