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

message_format is not returned in response to mediatype.get API call

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 7.0.11rc1
    • None
    • API (A)
    • None
    • Zabbix 7.0.9
    • S25-W8/9
    • 1

      Steps to reproduce:

      1. $ curl -s --request POST --url 'http://ls1:8080/api_jsonrpc.php' --header 'Content-Type: application/json-rpc' --header 'Authorization: Bearer f5e1a391830e3fafe9501bb16c3d331d' --data '{"jsonrpc":"2.0","method":"mediatype.get","params": {"mediatypeids":"1","output":"extend"}

        ,"id":1}' | jq .

      Result:
      **

      With Zabbix 7.0.9:

      {
        "jsonrpc": "2.0",
        "result": [
          {
            "mediatypeid": "1",
            "type": "0",
            "name": "Email",
            "smtp_server": "mail.example.com",
            "smtp_helo": "example.com",
            "smtp_email": "[email protected]",
            "exec_path": "",
            "gsm_modem": "",
            "username": "",
            "passwd": "",
            "status": "1",
            "smtp_port": "25",
            "smtp_security": "0",
            "smtp_verify_peer": "0",
            "smtp_verify_host": "0",
            "smtp_authentication": "0",
            "maxsessions": "1",
            "maxattempts": "3",
            "attempt_interval": "10s",
            "script": "",
            "timeout": "30s",
            "process_tags": "0",
            "show_event_menu": "0",
            "event_menu_url": "",
            "event_menu_name": "",
            "description": "",
            "provider": "0",
            "content_type": "0",
            "parameters": []
          }
        ],
        "id": 1
      }

      Expected:
      With Zabbix 7.0.8

      {
        "jsonrpc": "2.0",
        "result": [
          {
            "mediatypeid": "1",
            "type": "0",
            "name": "Email",
            "smtp_server": "mail.example.com",
            "smtp_helo": "example.com",
            "smtp_email": "[email protected]",
            "exec_path": "",
            "gsm_modem": "",
            "username": "",
            "passwd": "",
            "status": "1",
            "smtp_port": "25",
            "smtp_security": "0",
            "smtp_verify_peer": "0",
            "smtp_verify_host": "0",
            "smtp_authentication": "0",
            "maxsessions": "1",
            "maxattempts": "3",
            "attempt_interval": "10s",
            "message_format": "0",
            "script": "",
            "timeout": "30s",
            "process_tags": "0",
            "show_event_menu": "0",
            "event_menu_url": "",
            "event_menu_name": "",
            "description": "",
            "provider": "0",
            "content_type": "0",
            "parameters": []
          }
        ],
        "id": 1
      }

            vmaksimovs Vladimirs Maksimovs
            BGmot Evgeny Yurchenko
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4h
                4h