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

Can't import templates

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Cannot Reproduce
    • Icon: Trivial Trivial
    • None
    • 4.4.8
    • API (A)
    • None
    • Ubuntu 18.04 Apache/2.4.29 Python3

      I'm trying import data to zabbix server using python3 with requests module.

      I'm using standart method "configuration.import".

      Steps to reproduce:

      body = {"jsonrpc": "2.0", "method": "configuration.import", "params": group_params, "id": 1, "auth": auth_key}

      requests.request('POST', url, json=body)

      where "group_params" is dict with data correctly formatted (if I try to import other objects like hostgroups etc. I have no problems) 

      tcpdumped request on server-side

      Result:
      Answer from server api:

      b'{"jsonrpc":"2.0","error":

      {"code":-32602,"message":"Invalid params.","data":"Invalid parameter \\"/source\\": a character string is expected."}

      ,"id":1}'

      But there is no "/source" string in request.

      tcpdumped response from server:


      Expected:
      Correct import

            aigars.kadikis Aigars Kadikis
            dankomv Danko Maxim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: