manual:appendix:api:user

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:appendix:api:user [2010/09/15 10:04]
127.0.0.1 external edit
manual:appendix:api:user [2014/09/26 11:30] (current)
sasha Links adapted because of a move operation
Line 1: Line 1:
-===== User ====+===== User ====
-==== Methods ==== +
-Class containing methods for operations with Users. Only super admins have access to all users. ​+
  
-^Methods^Description^ +This class is designed to work with users. ​
-|[[1.8/​api/​user/​get|get()]] |Get user details | +
-|[[1.8/​api/​user/​create|create()]] |Create ​users +
-|[[1.8/​api/​user/​update|update()]] |Update user details | +
-|[[1.8/​api/​user/​updateProfile|updateProfile()]] |Update user profile | +
-|[[1.8/​api/​user/​delete|delete()]] |Delete users | +
-|[[1.8/​api/​user/​addMedia|addMedia()]] |Add user media | +
-|[[1.8/​api/​user/​updateMedia|updateMedia()]] |Update user medias | +
-|[[1.8/​api/​user/​deleteMedia|deleteMedia()]] |Remove user medias | +
-|[[1.8/​api/​user/​login|login()]] |Login | +
-|[[1.8/​api/​user/​logout|logout()]] |Logout |+
  
-==== Object ​details ==== +Object ​references: \\ 
-=== User ===+  * [[manual:​appendix:​api:​user:​definitions#​user|User]]
  
-The table contains complete list of User attributes.+Available methods: \\
  
-^Parameter^Type^Description^Details^ +  ​''​[[manual:​appendix:​api:​user:​addmedia|user.addmedia]]'' ​adding media to users 
-|**userid**|//​integer//​|User ID | | +  ''​[[manual:​appendix:​api:​user:​create|user.create]]''​ - creating new users 
-|**alias**|//​string//​|Login | | +  ''​[[manual:​appendix:​api:​user:​delete|user.delete]]''​ - deleting users 
-|**name**|//​string//​|Name | | +  ''​[[manual:​appendix:​api:​user:​deletemedia|user.deletemedia]]''​ - deleting ​media from users 
-|**surname**|//​string//​|Surname | | +  ''​[[manual:​appendix:​api:​user:​get|user.get]]''​ - retrieving users 
-|**passwd**|//​string//​|Password | md5 | +  ''​[[manual:​appendix:​api:​user:​isreadable|user.isreadable]]''​ - checking if users are readable 
-|**url**|//​string//​|Url to open after user login | | +  ''​[[manual:​appendix:​api:​user:​iswritable|user.iswritable]]''​ - checking if users are writable 
-|**autologin**|//​integer//​|Auto login | | +  ''​[[manual:​appendix:​api:​user:​login|user.login]]'' ​logging in to the API 
-|**autologout**|//​integer//​|Auto logout | In seconds, 0 disabled | +  ''​[[manual:​appendix:​api:​user:logout|user.logout]]''​ - logging out of the API 
-|**lang**|//​string//​|Locale | | +  * ''​[[manual:​appendix:​api:​user:update|user.update]]''​ - updating users 
-|**refresh**|//​integer//​|Page refresh period | | +  ​''​[[manual:​appendix:​api:user:​updatemedia|user.updatemedia]]''​ - updating user media 
-|**type**|//​integer//​|User type | | +  ​''​[[manual:​appendix:​api:​user:​updateprofile|user.updateprofile]]''​ - updating the currently logged in user
-|**theme**|//​string//​|Theme | | +
-|**attempt_failed**|//​integer//​|Number of failed login attempts | | +
-|**attempt_ip**|//​string//​|Last used IP to login | | +
-|**attempt_clock**|//​integer//​|Last login attempt date | | +
-|**rows_per_page**|//​integer//​|Rows per page to show | | +
-  +
-=== User Media === +
-The table contains complete list of User media attributes+
- +
-^Parameter^Type^Description^Details^ +
-|**mediaid**|//​integer//​|User ​media ID | | +
-|**userid**|//​integer//​|User ID | +
-|**mediatypeid**|//​integer//​|User media type ID | | +
-|**sendto**|//​string//​|Where to send | |  +
-|**active**|//​integer//​|Enabled or disabled this media | | +
-|**severity**|//​integer//​|Trigger severity | bit arithmetics | +
-|**period**|//​string//​|User media period | | +
- +
-==== Common tasks ==== +
-The table contains list of common ​user-related tasks and possible implementation using Zabbix ​API +
-^Task^HOWTO^ +
-|Add a user | Use method **user.create** ​| +
-|Add a bunch of new users | Use method **user.create** with array of User objects | +
-|Rename ​user | Use method **user.update**, set **"​name"​:"<​new name>"​** | +
-|Retrieve ​user details by User IDs Use method **user.get** with parameter **userids** | +
-|Retrieve ​user details by User alias Use method **user.get** with parameter **filter**, specify **"​alias":"<​user alias>"​** |+