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

"tags" parameter for maintenance is ignored via API

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 4.0.35, 5.0.17, 5.4.7
    • None
    • None

      Steps to reproduce:

      Just do an API request to maintenance.create endpoint with tags:

       

      
      

      **

      curl -H 'Content-Type: application/json-rpc' -X POST -d '{ \
        "jsonrpc": "2.0", \
        "method": "maintenance.create", \
        "params": { \
          "groupids": [ \
            "2", \
            "7" \
          ], \
          "hostids": [ \
            "10432", \
            "10084" \
          ], \
          "name": "maintenance", \
          "maintenance_type": 1, \
          "active_since": "1635658200.0", \
          "active_till": "1635663600.0", \
          "description": "test description", \
          "tags_evaltype": "0", \
          "timeperiods": [ \
            { \
              "timeperiod_type": "0", \
              "start_date": "1635658200.0", \
              "period": "5400" \
            } \
          ], \
          "tags": [ \
            { \
              "tag": "TestTag", \
              "operator": "2", \
              "value": "test123" \
            } \
          ] \
        }, \
        "id": 1, \
        "auth": "f2916e064c54d2af73f8e1cb68a07b01" \
      }' http://localhost:8080/api_jsonrpc.php

       

      Result:

      {"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
      

      Expected:
      That maintenance with Tags will be created

            avolodin Aleksey Volodin
            D3DeFi Dusan Matejka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: