Ad Widget

Collapse

api: delete user media (get user mediaids)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • axterics
    Junior Member
    • Jan 2009
    • 12

    #1

    api: delete user media (get user mediaids)

    I want to delete via API all media associated to a user.

    The function userMedia->delete exist but I must specify the mediaids.
    I try to get the mediaids from user->get(select_media = extend) but looking at the API source the piece of code is not implemented:

    PHP Code:
    frontends/php/api/classes/class.cuser.php

    // TODO:
    // Adding medias
            
    if(!is_null($options['select_medias']) && str_in_array($options['select_medias'], $subselects_allowed_outputs)){
            }
    // Adding mediatypes
            
    if(!is_null($options['select_mediatypes']) && str_in_array($options['select_mediatypes'], $subselects_allowed_outputs)){
            } 
    Is there a workaround to get the user mediaids via API?
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Here is patch, it's not official though
    Attached Files
    Zabbix | ex GUI developer

    Comment

    • axterics
      Junior Member
      • Jan 2009
      • 12

      #3
      Thanks a lot. Exactly what I need.

      I search in SVN but I don't find this piece of code. Is there a place where are available this development patches?

      Comment

      • RobertS
        Member
        • Aug 2006
        • 57

        #4
        The piece of code is still missing (1.8.8). Why is this in the documentation of the API if not yet implemented? Not even a notice!

        Comment

        • zalex_ua
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2009
          • 1286

          #5
          Should be fixed in the https://support.zabbix.com/browse/ZBX-5032

          Comment

          Working...