The method allows to retrieve media types according to the given parameters.该方法允许根据给定的参数来检索媒体类型。
Parameters参数
(object)
Parameters defining the desired output.定义所需输出的参数。
Returns either:返回:
an array of objects;一组对象;
Examples 示例
Retrieving media types检索媒体类型
Retrieve all configured media types.检索所有配置的媒体类型。
Request:
- {
- "jsonrpc": "2.0",
- "result": [
- {
- "mediatypeid": "1",
- "type": "0",
- "description": "Email",
- "smtp_server": "mail.company.com",
- "smtp_email": "[email protected]",
- "exec_path": "",
- "gsm_modem": "",
- "username": "",
- "passwd": "",
- "status": "0"
- },
- {
- "mediatypeid": "2",
- "type": "3",
- "description": "Jabber",
- "smtp_server": "",
- "smtp_helo": "",
- "smtp_email": "",
- "exec_path": "",
- "gsm_modem": "",
- "username": "",
- "status": "0"
- },
- {
- "mediatypeid": "3",
- "type": "2",
- "description": "SMS",
- "smtp_server": "",
- "smtp_helo": "",
- "smtp_email": "",
- "exec_path": "",
- "gsm_modem": "/dev/ttyS0",
- "username": "",
- "passwd": "",
- "status": "0"
- }
- ],
- "id": 1
Source来源
CMediaType::get() in frontends/php/include/classes/api/services/CMediaType.php.