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

Can't delete host through API

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.3
    • Fix Version/s: 1.8.4rc3
    • Component/s: API (A)
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: