ExportXMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 8.0.0
    • Component/s: API (A)
    • Support backlog
    • 1

      When calling trigger.get on Zabbix Server 8.0.0 with selectTags: "extend", each tag object returned includes an extra field automatic that is not returned by earlier versions (5.0, 6.0, 7.0). For example:

      json[{'tag': 'scope', 'value': 'capacity', 'automatic': '0'}]

      If this tag array is passed back verbatim to trigger.update, the API rejects the request because automatic is not an accepted parameter for trigger tags. Removing the automatic field makes the update succeed.

      This did not happen on Zabbix 5.0, 6.0, or 7.0 — the same round-trip (trigger.get → trigger.update) worked without stripping any fields.

      Steps to reproduce:

      1. On Zabbix Server 8.0.0, call trigger.get with the following parameters:
        json{ "jsonrpc": "2.0", "method": "trigger.get", "params": { "output": ["tags"], "selectTags": "extend", "templateids": "18609", "evaltype": 0, "selectHosts": ["host", "hostid"] }, "id": 1 }
      1. Observe that each tag object contains an automatic key, e.g. 
        [{'tag': 'scope', 'value': 'capacity', 'automatic': '0'}]
      1. Pass the returned tag array directly to trigger.update:
        json{ "jsonrpc": "2.0", "method": "trigger.update", "params": { "triggerid": "...", "tags": [{'tag': 'scope', 'value': 'capacity', 'automatic': '0'}] }, "id": 1 }
      1. The API returns an error: the automatic field is not recognized for trigger tags.

      Expected behavior:

      Either of the following:

      • trigger.get with selectTags: "extend" should not return the automatic field in tag objects, consistent with 5.0/6.0/7.0; or
      • trigger.update should accept and silently ignore the automatic field if it is present in the input, so that a get → update round-trip works without the client having to strip fields.

      The current behavior breaks a common pattern: read existing tags via trigger.get, modify a value, and write back via trigger.update.

      Additional context:

      • The automatic field appears to be related to trigger tag inheritance/internal flag, but it is undocumented in the trigger.get selectTags return schema for 8.0.
      • Workaround: strip the automatic key from each tag object before passing to trigger.update.
      • Please document this field if it is intentional, or remove it from the selectTags: "extend" output if it is not meant to be exposed.

            Assignee:
            Zabbix Development Team
            Reporter:
            NoYoWiFi
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: