Problems importing JSON templates

XMLWordPrintable

    • Type: Change Request
    • Resolution: Duplicate
    • Priority: Minor
    • None
    • Affects Version/s: 3.0.1
    • Component/s: API (A), Frontend (F)
    • Environment:
      Centos7, PostgreSQL-9.5.1, zabbix-3.0.1

      Zabbix has problems importing templates in JSON format. XML works without problems.

      If one use the zabbix API to export a template in JSON format (check attachment:zabbix_export_template.json) , the system will not be able to import this export file via the API or the frontend.

      The error we get via de API is: "... Application error.: Invalid XML tag "/zabbix_export/groups": unexpected tag "0". while sending ...."

      Via the frontend the error is: "...Invalid XML tag "/zabbix_export/groups": unexpected tag "0"...."

      According to the documentation this should work, "Import supports both XML and JSON, the import file must have a correct file extension: .xml for XML and .json for JSON.".

      I addition, when trying to import via the API, we use "format":"json" to specify that the file is a json file. (Check attachment with full information about json data send to the API: json_data_send_to_api.txt)

      I looks like the system doesn't discover that we are sending JSON data, try to parse de content as XML and fails.

      Any ideas on how to fix this? Thanks.

            Assignee:
            Unassigned
            Reporter:
            Rafael Martinez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: