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

slightly incorrect api response to media type requests

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unsupported version
    • Icon: Trivial Trivial
    • None
    • 4.0.3
    • API (A)

      Steps to reproduce:
      Send an API request similar to this:

      {"auth":"---","params":{"smtp_helo":null,"exec_path":"scriptpath","smtp_server":null,"smtp_email":null,"exec_params":null,"type":1,"description":"scripttest"},"jsonrpc":"2.0","method":"mediatype.create","id":4}
      

      API responds with:

      Error: Script parameters "" are missing the last new line feed for media type "scripttest".

      Now send an API request similar to this:

      {"auth":"---","params":{"smtp_helo":null,"exec_path":"scriptpath","smtp_server":null,"smtp_email":null,"exec_params":"","type":1,"description":"scripttest"},"jsonrpc":"2.0","method":"mediatype.create","id":4}
      

      Result:
      API accepts empty string, even though it previously suggested trailing newline is needed.

      Expected:
      Either 'null' should be accepted as no parameters, or the API error message should be fixed.

            zabbix.dev Zabbix Development Team
            richlv richlv
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: