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

Can't delete host through API

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.4rc3
    • 1.8.3
    • API (A)
    • None

      When i trying to delete host through API, i recieved error: "You do not have permission to perform this operation".
      But user which i use have API access and write access to host. And i geting request describe on http://www.zabbix.com/documentation/1.8/api/host/delete

      Example:
      >>> zapi = zabbix_api.ZabbixAPI()
      >>> zapi.login('Admin', 'zabbix')
      >>> zapi.host.get(

      { 'count' : True }

      )
      [

      {u'hostid': u'10017'}

      ,

      {u'hostid': u'10047'}

      ,

      {u'hostid': u'10051'}

      ]

      !!! >>> zapi.host.delete(

      {'hostid': '10047'}

      )
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "zabbix_api.py", line 293, in wrapper
      return self.do_request(self.json_obj(name,opts))['result']
      File "zabbix_api.py", line 275, in do_request
      return self.parent.do_request(req)
      File "zabbix_api.py", line 240, in do_request
      raise ZabbixAPIException(msg)
      zabbix_api.ZabbixAPIException: Error -32500: Application error., [ CHost::delete ] You do not have permission to perform this operation

      I think the problem not seems to me in permission, it in worng parameters or it API bug

            Unassigned Unassigned
            alp max
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: