See attached patch (based on just released 2.0.0)
(1) Apply the patch to add all time documented but missing in the code parameter "selectMediatypes" for user.get method
http://www.zabbix.com/documentation/2.0/manual/appendix/api/user/get
along with a fix for parameters userids,mediaids for mediatype.get (dummy typo in a table name)
http://www.zabbix.com/documentation/2.0/manual/appendix/api/mediatype/get
(2) Also consider to apply patch to the 1.8 (and also add support of selectMedias from 2.0 to 1.8) or remove declaration of parameters select_medias, select_mediatypes from 1.8 documentation.
http://www.zabbix.com/documentation/1.8/api/user/get
Because it misleads users all these years:
http://www.zabbix.com/forum/showthread.php?t=21042
http://boardreader.com/thread/API_Call_is_failing_any_ideas_why_q2Xhii.html
After patch:
Request:
{ "userids":[3, 7], "selectMediatypes":"refer" }Response:
"result":[{
"userid":"3",
"mediatypes":[
]
},{
"userid":"7",
"mediatypes":[
,
{ "mediatypeid":"2" }]
}],
ALL is correct - TESTED
- is duplicated by
-
ZBX-5043 leave API method "usermedia.get" and remove other "usermedia.*" for 2.0 which duplicates user.addMedia .deleteMedia .updateMedia
- Closed