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

`selectInheritedTags` doesn't support "extend" value anymore on `host.get` API

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • 7.4.6rc1
    • 7.4.3
    • API (A)
    • S25-W44/45, S25-W46/47, S25-W48/49
    • 0.5

      Steps to reproduce:

      Send the following request to Zabbix API : 

      {
        "jsonrpc": "2.0",
        "method": "host.get",
        "params": {
          "output": [
            "hostid"
          ],
          "selectInheritedTags": "extend"
        },
        "id": 1
      } 

       

      Result:

      {
        "jsonrpc": "2.0",
        "result": [
          {
            "hostid": "10084",
            "inheritedTags": [
              [],
              [],
              [],
              [],
              []
            ]
          }
        ],
        "id": 1
      } 

      Expected:

      {
        "jsonrpc": "2.0",
        "result": [
          {
            "hostid": "10084",
            "inheritedTags": [
              {
                "tag": "class",
                "value": "software"
              },
              {
                "tag": "target",
                "value": "server"
              },
              {
                "tag": "target",
                "value": "zabbix"
              },
              {
                "tag": "class",
                "value": "os"
              },
              {
                "tag": "target",
                "value": "linux"
              }
            ]
          }
        ],
        "id": 1
      }

       

      Notes:

      1. To have the right output (Expected), you have to specify `["tag", "value"]` for `selectInheritedTags` field.

      2. The number of arrays returned by the API when using "extend" match the number of inherited tags

            jfreibergs Janis Freibergs
            romgille Romain GILLE
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 12h 10m
                12h 10m