Zabbix Documentation 1.8 (current)| In development:5.2 (devel)| Unsupported:

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

api:usergroup [2015/12/15 14:45]
api:usergroup [2014/11/08 00:24] (current)
richlv [Usrgrp] fix another typo
Line 1: Line 1:
 +===== Usergroup =====
 +==== Methods ====
 +Class containing methods for operations with User groups.
 +|[[api:​usergroup:​get|get()]] |Get user group details |
 +|[[api:​usergroup:​exists|exists()]] |Check if user group exists |
 +|[[api:​usergroup:​create|create()]] |Create user groups |
 +|[[api:​usergroup:​update|update()]] |Update user group details |
 +|[[api:​usergroup:​delete|delete()]] |Delete user groups |
 +|[[api:​usergroup:​massAdd|massAdd()]] |Mass add rights, users to user groups |
 +|[[api:​usergroup:​massUpdate|massUpdate()]] |Mass update user group details, update list of rights, users |
 +|[[api:​usergroup:​massRemove|massRemove()]] |Mass remove rights, users |
 +==== Object details ====
 +=== Usrgrp ===
 +The table contains complete list of User Group attributes.
 +|**usrgrpid**|//​integer//​| User group id| |
 +|**name**|//​string//​| Name | |
 +|**gui_access**|//​integer//​| GUI access| system default(0), internal(1),​ disabled(2) |
 +|**users_status**|//​integer//​| User status| enabled(0), disabled(1) |
 +|**api_access**|//​integer//​| API access| disabled(0),​ enabled(1) |
 +|**debug_mode**|//​integer//​| Debug mode| disabled(0),​ enabled(1) |
 +=== Rights ===
 +The table contains complete list of Rights attributes.
 +|groupid|//​integer//​|User group ID | |
 +|id|//​integer//​|Host Group ID. | |
 +|permission|//​string//​|Permission. | deny(0), read(2), read-write(3) |
 +==== Common tasks ====
 +The table contains list of common user-related tasks and possible implementation using Zabbix API
 +|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>"​** |