This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

usergroup.massupdate

Description

object usergroup.massupdate(object parameters)

This method allows to simultaneously update properties, users or permissions for multiple user groups.

This method is deprecated and will be removed in the future. Please use usergroup.update instead.

Parameters

(object) Parameters containing the IDs of the user groups to update and the properties that should be updated.

Additionally to the standard user group properties, the method accepts the following parameters.

Parameter Type Description
usrgrpids
(required)
string/array IDs of user groups to update.
rights string/array Permissions to replace the current permissions assigned to the user group.
userids object/array IDs of the users to replace the users in the group.

Return values

(object) Returns an object containing the IDs of the updated user groups under the usrgrpids property.

Examples

Changing permissions for a user group

Update the permissions for two user groups to only allow read-write access to two host groups.

Request:

{
           "jsonrpc": "2.0",
           "method": "usergroup.massupdate",
           "params": {
               "usrgrpids": [
                   "17",
                   "19"
               ],
               "rights": [
                   {
                       "permission": 3,
                       "id": "2"
                   },
                   {
                       "permission": 3,
                       "id": "3"
                   }
               ]
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "usrgrpids": [
                   "17",
                   "19"
               ]
           },
           "id": 1
       }

See also

Source

CUserGroup::massUpdate() in frontends/php/include/classes/api/services/CUserGroup.php.