-
Problem report
-
Resolution: Won't fix
-
Major
-
None
-
7.0.3
-
None
Steps to reproduce:
API in version 7 has issue with mediatype object
Mediatype get
{ "jsonrpc": "2.0", "method": "mediatype.get", "params": { "output": "extend", "selectMessageTemplates": "extend" }
Result:
{"mediatypeid":"55","type":"1","name":"Zabbix AR Action","smtp_server":"","smtp_helo":"","smtp_email":"","exec_path":"zabbix.ar.action","gsm_modem":"","username":"","passwd":"","status":"0","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":"1","script":"","timeout":"30s","process_tags":"0","show_event_menu":"0","event_menu_url":"","event_menu_name":"","description":"","provider":"0","content_type":"1","message_templates":[],"parameters":[{"sortorder":"0","value":"/sb/zabbix/etc/config.ini"},{"sortorder":"1","value":"{ALERT.SUBJECT}"},{"sortorder":"2","value":"{ALERT.MESSAGE}"}]}
Post the above value response to update the mediatype get's error:
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Deprecated parameter \"/1/content_type\" cannot be used with \"/1/message_format\"."},"id":1}
Expected:
Expected that get method doe's not contain the deprecated field content_type
https://www.zabbix.com/documentation/current/en/manual/api/reference/mediatype/object
{"mediatypeid":"55","type":"1","name":"Zabbix AR Action","smtp_server":"","smtp_helo":"","smtp_email":"","exec_path":"zabbix.ar.action","gsm_modem":"","username":"","passwd":"","status":"0","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":"1","script":"","timeout":"30s","process_tags":"0","show_event_menu":"0","event_menu_url":"","event_menu_name":"","description":"","provider":"0","message_templates":[],"parameters":[{"sortorder":"0","value":"/sb/zabbix/etc/config.ini"},{"sortorder":"1","value":"{ALERT.SUBJECT}"},{"sortorder":"2","value":"{ALERT.MESSAGE}"}]}
content_type (deprecated) |
integer | This parameter is deprecated, please use message_format instead. Message format. Possible values: 0 - plain text; 1 - (default) html. |
- related to
-
ZBXNEXT-9138 zabbix fails to work with recent versions of mysql_aurora - "content_type" column name is reserved
- Closed
-
ZBXNEXT-9452 Remove the deprecated API features from 7.2
- Closed