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

host.delete api method issue

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 3.4.4
    • None
    • API (A)
    • None

    Description

      Hi,

      Not sure if this is intended feature, but it seems that you are not able to delete array of hosts if one of those host id's are missing from Zabbix

      How reproduce (Using Zabbix.Api.Core .Net library):

      private static void DeleteHost(List<int> hostId)
      {
                  Zabbix zabbix = new Zabbix("Admin", "secret", "url");
                  zabbix.LoginAsync().Wait();
      
                  Task<string> response = zabbix.GetDeleteResponseJSonAsync("host.delete", 
                      hostId
                  );
                  response.Wait();
                  Console.WriteLine(response.Result);
                  zabbix.LogoutAsync().Wait();
      }
      

      This translates to request like:

      {"jsonrpc":"2.0","method":"host.delete","id":1,"auth":"123","params":[10390,10386]}

      Received error message: host.delete error: No permissions to referred object or it does not exist!

      Expected:
      It would delete all host id's which are found and return not found for missing id's in zabbix. In this case lets say that 10390 is found in zabbix and 10386 not. 10390 would return success and 10386 not found.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Hetlwe Hetlwe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: