Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

api:usergroup

Usergroup

Methods

Class containing methods for operations with User groups.

MethodsDescription
get() Get user group details
exists() Check if user group exists
create() Create user groups
update() Update user group details
delete() Delete user groups
massAdd() Mass add rights, users to user groups
massUpdate() Mass update user group details, update list of rights, users
massRemove() Mass remove rights, users

Object details

Usrgrp

The table contains complete list of User Group attributes.

ParameterTypeDescriptionDetails
usrgrpidinteger User group id
namestring Name
gui_accessinteger GUI access system default(0), internal(1), disabled(2)
users_statusinteger User status enabled(0), disabled(1)
api_accessinteger API access disabled(0), enabled(1)
debug_modeinteger Debug mode disabled(0), enabled(1)

Rights

The table contains complete list of Rights attributes.

ParameterTypeDescriptionDetails
groupidintegerUser group ID
idintegerHost Group ID.
permissionstringPermission. deny(0), read(2), read-write(3)

Common tasks

The table contains list of common user-related tasks and possible implementation using Zabbix API

TaskHOWTO
Add a user group Use method usergroup.create
Add a bunch of new user groups Use method usergroup.create with array of User group objects
Add users to user group Use method usergroup.massAdd with array of user IDs
Add a host group with read-write or read permissions to user group Use method usergroup.massAdd with array of rights objects
Retrieve user group details by Group IDs Use method usergroup.get with parameter usrgrpids
Retrieve user group details by User group name Use method usergroup.get with parameter filter, specify “name”:“<your usergroup>“