此方法用于检索给定参数和符合条件的媒介类型
参数
(object)
定义所需输出的参数。
(integer/array)
返回如下:
一个对象数组;
示例如下
检索媒介类型
检索所有配置的媒介类型
Request:
{
"jsonrpc": "2.0",
"result": [
{
"mediatypeid": "1",
"type": "0",
"description": "Email",
"smtp_server": "mail.company.com",
"smtp_helo": "company.com",
"smtp_email": "[email protected]",
"exec_path": "",
"username": "",
"passwd": "",
"maxsessions": "1",
"maxattempts": "7",
"attempt_interval": "10s"
},
{
"mediatypeid": "2",
"type": "3",
"description": "Jabber",
"smtp_server": "",
"smtp_helo": "",
"smtp_email": "",
"exec_path": "",
"gsm_modem": "",
"username": "[email protected]",
"passwd": "zabbix",
"status": "0",
"maxsessions": "1",
},
{
"mediatypeid": "3",
"type": "2",
"description": "SMS",
"smtp_server": "",
"smtp_helo": "",
"smtp_email": "",
"exec_path": "",
"gsm_modem": "/dev/ttyS0",
"username": "",
"passwd": "",
"status": "0",
"maxsessions": "1",
"maxattempts": "7",
"attempt_interval": "10s"
}
],
源
CMediaType::get() in frontends/php/include/classes/api/services/CMediaType.php.