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.
Table of Contents

get()

Available since version: 1.8
This function allows you to retrieve user group details based on filtering options. All parameters are optional. If parameter is set in query this option counted as ON, except if parameter is equal to NULL.

Parameters

Parameter Type Description Details
nodeids array Node IDs
usrgrpids array UserGroup IDs
userids array User IDs
status boolean
with_gui_access boolean
with_api_access boolean
editable integer only with read-write permission. Ignored for SuperAdmins
filter array Optional filter by user group fields
search array Return user groups by any given user group object field pattern
startSearch integer Search user groups field pattern only in start of the field
excludeSearch integer Exclude from result, user groups by given field pattern
searchWildcardsEnabled integer Search pattern in whole field using wildcards 1 - enable, 0 - disable
select_users string Select contained users Values: refer, extend
output string Output options Values: shorten, refer, extend
countOutput integer Count user groups, return the number of user groups found
preservekeys integer Return hash instead of array Keys of hash are object IDs
sortfield string Sort by user group field Values: usrgrpid, name
sortorder string Sort order Values: ASC, DESC
limit int Max number of user group objects to return

Returns

Parameter Description
result Operation successful. Result will contain array of User group objects.
error In case of any errors

Example

Get details for user groups with names "Debug group","Zabbix administrators", and select users ID in those groups :

{
       "jsonrpc":"2.0",
       "method":"usergroup.get",
       "params":{
           "filter":{"name":["Debug group","Zabbix administrators"]},
           "select_users":"refer",
           "output":"extend"
       },
       "auth":"6f38cddc44cfbb6c1bd186f9a220b5a0",
       "id":2
       }

Retrieved details for user groups with names "Debug group","Zabbix administrators" :

{
       "jsonrpc":"2.0",
       "result":[
       {
           "users":[
               {"userid":"100100000000005"}
           ],
           "usrgrpid":"100100000000007",
           "name":"Zabbix administrators",
           "gui_access":"0",
           "users_status":"0",
           "api_access":"0",
           "debug_mode":"0"
       },
       {
           "users":[
               {"userid":"100100000000005"},
               {"userid":"100100000000001"},
               {"userid":"100100000000003"},
               {"userid":"100100000000004"},
               {"userid":"100100000000018"}
           ],
           "usrgrpid":"100100000000022",
           "name":"Debug group",
           "gui_access":"0",
           "users_status":"0",
           "api_access":"0",
           "debug_mode":"1"
       }],
       "id":2
       }