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

create()

This function allows you to create a user group as defined by the user group data array.

Parameters

Parameter Type Optional Description Details
usergroup data array or object Array of User group objects or a single object usrgrpid shouldn't be specified

Returns

Parameter Description
result Operation successful. Result will contain array of created User group IDs. usrgrpid are assigned to each User group object
error In case of any errors

Example

{
       "jsonrpc":"2.0",
       "method":"usergroup.create",
       "params":[
          {"name":"Debug Group"}
       ],
       "auth":"038e1d7b1735c6a5436ee9eae095879e",
       "id":3
       }

User group created successfully:

{
       "jsonrpc":"2.0",
       "result":{
          "usrgrpids": ["107819"]
       },
       "id":3
       }

User group already exists:

{
       "jsonrpc":"2.0",
       "error":{
             "code":-32602,
             "message":"Invalid params.",
             "data":"[ CUserGroup::create ] User group [ Debug Group ] already exists"
       },
       "id":3
       }