[ZBX-26057] message_format is not returned in response to mediatype.get API call Created: 2025 Feb 15  Updated: 2025 Mar 18  Resolved: 2025 Mar 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: None
Fix Version/s: 7.0.11rc1

Type: Problem report Priority: Minor
Reporter: Evgeny Yurchenko Assignee: Wiktor Czerneha
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 9h
Original Estimate: Not Specified
Environment:

Zabbix 7.0.9


Issue Links:
Causes
Team: Team C
Sprint: S25-W8/9, S25-W10/11
Story Points: 1

 Description   

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
}


 Comments   
Comment by Wiktor Czerneha [ 2025 Mar 06 ]

Available in pre-7.0.11rc1 67d1d8abeeb

Generated at Fri May 02 08:53:42 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.