此方法用于检索给定参数和符合条件的媒介类型

    参数

    (object) 定义所需输出的参数。

    (integer/array)返回如下:

    • 一个对象数组;

    示例如下

    检索媒介类型

    检索所有配置的媒介类型

    Request:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "mediatypeid": "1",
    6. "type": "0",
    7. "description": "Email",
    8. "smtp_server": "mail.company.com",
    9. "smtp_helo": "company.com",
    10. "smtp_email": "[email protected]",
    11. "exec_path": "",
    12. "username": "",
    13. "passwd": "",
    14. "maxsessions": "1",
    15. "maxattempts": "7",
    16. "attempt_interval": "10s"
    17. },
    18. {
    19. "mediatypeid": "2",
    20. "type": "3",
    21. "description": "Jabber",
    22. "smtp_server": "",
    23. "smtp_helo": "",
    24. "smtp_email": "",
    25. "exec_path": "",
    26. "gsm_modem": "",
    27. "username": "[email protected]",
    28. "passwd": "zabbix",
    29. "status": "0",
    30. "maxsessions": "1",
    31. },
    32. {
    33. "mediatypeid": "3",
    34. "type": "2",
    35. "description": "SMS",
    36. "smtp_server": "",
    37. "smtp_helo": "",
    38. "smtp_email": "",
    39. "exec_path": "",
    40. "gsm_modem": "/dev/ttyS0",
    41. "username": "",
    42. "passwd": "",
    43. "status": "0",
    44. "maxsessions": "1",
    45. "maxattempts": "7",
    46. "attempt_interval": "10s"
    47. }
    48. ],

    CMediaType::get() in frontends/php/include/classes/api/services/CMediaType.php.