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.getobjects

Description

array usergroup.getobjects(object filter)

This method allows to retrieve user groups that match the given filter criteria.

Parameters

(object) Criteria to search by.

Additionally to the standard standard user group properties the following parameters are supported as search criteria.

Parameter Type Description
name string Name of the user group.
node string Name of the node the user groups must belong to.

This will override the nodeids parameter.
nodeids string/array IDs of the nodes the user groups must belong to.

Return values

(array) Returns an array of objects with all properties.

Examples

Retrieving a user group by name

Retrieve all data about the user group "Zabbix administrators".

Request:

{
           "jsonrpc": "2.0",
           "method": "usergroup.getobjects",
           "params": {
               "name": "Zabbix administrators"
           },
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": [
               {
                   "usrgrpid": "7",
                   "name": "Zabbix administrators",
                   "gui_access": "0",
                   "users_status": "0",
                   "debug_mode": "1"
               }
           ],
           "id": 1
       }

See also

Source

CUserGroup::getObject() in frontends/php/api/classes/CUserGroup.php.