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

Unable to remove host group via API

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 6.4.13
    • API (A)
    • None

      Steps to reproduce:

      1. Attempt to remove the only host group from a host by entering a blank group:
        { "jsonrpc": "2.0", "method": "host.update", "params": { "hostid": "10628", "groups": { }}, "id": 1 }
        
      2. Receive error from the APIĀ 

      Result:
      API result is

      {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Host \"SERVER_NAME\" cannot be without host group."},"id":1}
      

      Expected:
      GUI allows for no host groups to be assigned to a host.

      Running the API call without the groups entry will cause the groups to not be updated

      Need a way to run an API to remove all groups from a host.

            zabbix.support Zabbix Support Team
            henry.bouma Henry Bouma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: