Zabbix Documentation 4.2

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

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

Both sides previous revision Previous revision
Next revision
Previous revision
manual:api:reference:mediatype:get [2014/09/30 12:54]
127.0.0.1 external edit
manual:api:reference:mediatype:get [2020/01/16 15:30] (current)
Andrejs.Griscenko fixed the example
Line 21: Line 21:
 ^ ||| ^ |||
 | 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 [[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 67: Line 67:
             "​type":​ "​0",​             "​type":​ "​0",​
             "​description":​ "​Email",​             "​description":​ "​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",​ 
 +            "​smtp_verify_peer":​ "​0",​ 
 +            "​smtp_verify_host":​ "​0",​ 
 +            "​smtp_authentication":​ "​0",​ 
 +            "​exec_params":​ "",​ 
 +            "​maxsessions":​ "​1",​ 
 +            "​maxattempts":​ "​3",​ 
 +            "​attempt_interval":​ "​10s",​ 
 +            "​content_type": "​0"​
         },         },
         {         {
Line 85: Line 95:
             "​exec_path":​ "",​             "​exec_path":​ "",​
             "​gsm_modem":​ "",​             "​gsm_modem":​ "",​
-            "​username":​ "​[email protected]company.com",+            "​username":​ "​[email protected]example.com",
             "​passwd":​ "​zabbix",​             "​passwd":​ "​zabbix",​
-            "​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": "​0"​
         },         },
         {         {
Line 100: Line 120:
             "​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": "​0"​
         }         }
     ],     ],
Line 113: Line 143:
 ==== Source ==== ==== Source ====
  
-CMediaType::​get() in //​frontends/​php/​api/​classes/​CMediaType.php//​.+CMediaType::​get() in //​frontends/​php/​include/classes/​api/​services/​CMediaType.php//​.