Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5032

add support of "selectMediatypes" for "user.get" and fix support of "userids,mediaids" for "mediatype.get"

XMLWordPrintable

      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":[

      { "mediatypeid":"6" }

      ]
      },{
      "userid":"7",
      "mediatypes":[

      { "mediatypeid":"1" }

      ,

      { "mediatypeid":"2" }

      ]
      }],

      ALL is correct - TESTED

            martins-v Martins Valkovskis
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: