Zabbix Documentation 4.4

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:api:reference:mediatype:get

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
manual:api:reference:mediatype:get [2014/09/25 14:43]
sasha Page moved from 2.4:manual:api:reference:mediatype:get to manual:api:reference:mediatype:get
manual:api:reference:mediatype:get [2020/01/17 09:33] (current)
Andrejs.Griscenko updated the example
Line 18: Line 18:
 | userids | string/​array | Return only media types used by the given users. | | userids | string/​array | Return only media types used by the given users. |
 ^ ||| ^ |||
-| selectUsers | query | Return the users that use the media type in the ''​users''​ property. |+| selectUsers | query | Return ​a ''​[[:/​manual/​api/​reference/​user/​object|users]]''​ property with the users that use the media type. |
 ^ ||| ^ |||
 | sortfield | string/​array | Sort the result by the given properties. \\ \\ Possible values are: ''​mediatypeid''​. ​ | | sortfield | string/​array | Sort the result by the given properties. \\ \\ Possible values are: ''​mediatypeid''​. ​ |
-| countOutput |flag|These parameters being common for all ''​get''​ methods are described in detail in the [[2.4:manual:​api:​reference_commentary#​common_get_method_parameters|reference commentary]]. ​ |+| countOutput |boolean|These parameters being common for all ''​get''​ methods are described in detail in the [[manual:​api:​reference_commentary#​common_get_method_parameters|reference commentary]]. ​ |
 | editable |boolean|:::​| | editable |boolean|:::​|
-| excludeSearch |flag|:::|+| excludeSearch |boolean|:::|
 | filter | object |:::| | filter | object |:::|
 | limit |integer|:::​| | limit |integer|:::​|
 | output |query|:::| | output |query|:::|
-| preservekeys |flag|:::|+| preservekeys |boolean|:::|
 | search | object |:::| | search | object |:::|
 | searchByAny |boolean|:::​| | searchByAny |boolean|:::​|
 | searchWildcardsEnabled |boolean|:::​| | searchWildcardsEnabled |boolean|:::​|
 | sortorder | string/​array | ::: | | sortorder | string/​array | ::: |
-| startSearch |flag|:::|+| startSearch |boolean|:::|
 ==== Return values ==== ==== Return values ====
  
Line 46: Line 46:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 59: Line 59:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 66: Line 66:
             "​mediatypeid":​ "​1",​             "​mediatypeid":​ "​1",​
             "​type":​ "​0",​             "​type":​ "​0",​
-            "description": "​Email",​ +            "name": "​Email",​ 
-            "​smtp_server":​ "mail.company.com",​ +            "​smtp_server":​ "mail.example.com",​ 
-            "​smtp_helo":​ "company.com",​ +            "​smtp_helo":​ "example.com",​ 
-            "​smtp_email":​ "​[email protected]company.com",+            "​smtp_email":​ "​[email protected]example.com",
             "​exec_path":​ "",​             "​exec_path":​ "",​
             "​gsm_modem":​ "",​             "​gsm_modem":​ "",​
             "​username":​ "",​             "​username":​ "",​
             "​passwd":​ "",​             "​passwd":​ "",​
-            "​status":​ "​0"​ +            "​status":​ "​0"​, 
-        }+            "​smtp_port":​ "​25"​
-        { +            "​smtp_security":​ "​0",​ 
-            "mediatypeid": "2", +            "smtp_verify_peer": "0", 
-            "type": "3", +            "smtp_verify_host": "0", 
-            "description": "Jabber", +            "smtp_authentication": "0", 
-            "smtp_server": "",​ +            "exec_params": "",​ 
-            "smtp_helo": "",​ +            "maxsessions": "1", 
-            "smtp_email": "",​ +            "maxattempts": "3", 
-            "exec_path": "",​ +            "attempt_interval": "10s", 
-            "gsm_modem": "",​ +            "content_type": "0", 
-            "username": "[email protected]", +            "script": "",​ 
-            "passwd": "zabbix", +            "timeout": "30s", 
-            "status": "​0"​+            "process_tags": "​0"​
 +            "​show_event_menu":​ "​1",​ 
 +            "​event_menu_url":​ "",​ 
 +            "​event_menu_name":​ "",​ 
 +            "​description":​ "",​ 
 +            "​parameters":​ []
         },         },
         {         {
             "​mediatypeid":​ "​3",​             "​mediatypeid":​ "​3",​
             "​type":​ "​2",​             "​type":​ "​2",​
-            "description": "​SMS",​+            "name": "​SMS",​
             "​smtp_server":​ "",​             "​smtp_server":​ "",​
             "​smtp_helo":​ "",​             "​smtp_helo":​ "",​
Line 100: Line 105:
             "​username":​ "",​             "​username":​ "",​
             "​passwd":​ "",​             "​passwd":​ "",​
-            "​status":​ "​0"​+            "​status":​ "​0"​
 +            "​smtp_port":​ "​25",​ 
 +            "​smtp_security":​ "​0",​ 
 +            "​smtp_verify_peer":​ "​0",​ 
 +            "​smtp_verify_host":​ "​0",​ 
 +            "​smtp_authentication":​ "​0",​ 
 +            "​exec_params":​ "",​ 
 +            "​maxsessions":​ "​1",​ 
 +            "​maxattempts":​ "​3",​ 
 +            "​attempt_interval":​ "​10s",​ 
 +            "​content_type":​ "​1",​ 
 +            "​script":​ "",​ 
 +            "​timeout":​ "​30s",​ 
 +            "​process_tags":​ "​0",​ 
 +            "​show_event_menu":​ "​1",​ 
 +            "​event_menu_url":​ "",​ 
 +            "​event_menu_name":​ "",​ 
 +            "​description":​ "",​ 
 +            "​parameters":​ []
         }         }
     ],     ],
Line 109: Line 132:
 ==== See also ==== ==== See also ====
  
-  * [[2.4:manual:​api:​reference:​user:​object#​user|User]]+  * [[manual:​api:​reference:​user:​object#​user|User]]
  
 ==== Source ==== ==== Source ====
  
-CMediaType::​get() in //​frontends/​php/​api/​classes/​CMediaType.php//​.+CMediaType::​get() in //​frontends/​php/​include/classes/​api/​services/​CMediaType.php//​.