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

weird and incorrect api responses to various group deleting attempts

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • API (A)

    Description

      followup issue to ZBX-2862

      try to delete user and host groups that are used in frontend scripts :

      1. usergroup deletion api responses
      1.1. weird api reaction to incorrect queries (especially see "JSON-rpc error generation failed"):

      {"jsonrpc":"2.0","method":"usergroup.delete","params":{"12":true},"auth":"de42619ff2871b5be5e0fc84192ff2fe","id":4}
      Response Code: 200
      Response Body: {"jsonrpc":"2.0","result":{"usrgrpids":[true]},"id":4}
      
      {"jsonrpc":"2.0","method":"usergroup.delete","params":{"usrgrpids":12},"auth":"de42619ff2871b5be5e0fc84192ff2fe","id":5}
      Response Code: 200
      Response Body: {"jsonrpc":"2.0","error":{"code":-32400,"message":"System error.","data":"JSON-rpc error generation failed. No such error: "},"id":5}
      

      1.2. response to correct syntax includes nbsp - should it be there ?

      "data":"[ CUserGroup::delete ] You cannot delete user group used in a script: group [deleteme] is used in script [deleteme]"
      

      2. attempting to delete such a hostgroup never gives out the real reason (although with the api syntax being quite inconsistent, i'm not really sure i'm using a correct syntax in any of these queries

      {"jsonrpc":"2.0","method":"hostgroup.delete","params":[{"groupid":30}],"auth":"de42619ff2871b5be5e0fc84192ff2fe","id":5}
      Response Code: 200
      Response Body: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"[ CHostGroup::delete ] Cannot delete group"},"id":5}
      
      {"jsonrpc":"2.0","method":"hostgroup.delete","params":["30"],"auth":"de42619ff2871b5be5e0fc84192ff2fe","id":5}
      Response Code: 200
      Response Body: {"jsonrpc":"2.0","error":{"code":-32500,"message":"Application error.","data":"[ CHostGroup::delete ] You do not have permission to perform this operation"},"id":5}
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              richlv richlv
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: