Zabbix Documentation 2.0

3.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.22.43.23.4

User Tools

Site Tools


manual:appendix:api:event: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:appendix:api:event:get [2012/10/24 07:50]
Pavels corrected links
manual:appendix:api:event:get [2019/01/28 14:49] (current)
sasha <code js> => <code java>
Line 18: Line 18:
 | hostids | string/​array | Return only events created by triggers that belong to the given hosts. | | hostids | string/​array | Return only events created by triggers that belong to the given hosts. |
 | triggerids | string/​array | Return only events that have been created by the given triggers. | | triggerids | string/​array | Return only events that have been created by the given triggers. |
-| object | integer | Return only events created by objects of the given type. \\ \\ Refer to the  [[2.0:​manual:​appendix:​api:​event:​definitions#​event|event object page]] for a list of supported object types. | +| object | integer | Return only events created by objects of the given type. \\ \\ Refer to the  [[definitions#​event|event object page]] for a list of supported object types. | 
-| source | integer | Return only events with the given type. \\ \\ Refer to the  [[2.0:​manual:​appendix:​api:​event:​definitions#​event|event object page]] for a list of supported event types. |+| source | integer | Return only events with the given type. \\ \\ Refer to the  [[definitions#​event|event object page]] for a list of supported event types. |
 ^ ||| ^ |||
 | acknowledged | boolean | If set to ''​true''​ return only acknowledged events. | | acknowledged | boolean | If set to ''​true''​ return only acknowledged events. |
 | value | integer/​array | Return only events with the given values. | | value | integer/​array | Return only events with the given values. |
-| time_from | integer ​| Return only events that have been created after or at the given time. \\ \\ Accepts a Unix timestamp. | +| time_from | timestamp ​| Return only events that have been created after or at the given time. | 
-| time_till | integer ​| Return only events that have been created before or at the given time. \\ \\ Accepts a Unix timestamp. |+| time_till | timestamp ​| Return only events that have been created before or at the given time. |
 | eventid_from | string | Return only events with IDs greater or equal to the given ID. | | eventid_from | string | Return only events with IDs greater or equal to the given ID. |
 | eventid_till | string | Return only events with IDs less or equal to the given ID. | | eventid_till | string | Return only events with IDs less or equal to the given ID. |
 ^ ||| ^ |||
-| selectHosts | query | Return hosts containing the trigger that created the event in the ''​hosts''​ property. \\ \\ Does not support ''​shorten'',​ ''​count''​ or arrays of properties. | +| selectHosts | query | Return hosts containing the trigger that created the event in the ''​hosts''​ property. \\ \\ Does not support ''​shorten''​ or arrays of properties. | 
-| selectItems | query | Return items contained in the trigger that created the event in the ''​items''​ property. \\ \\ Does not support ''​shorten'',​ ''​count''​ or arrays of properties. | +| selectItems | query | Return items contained in the trigger that created the event in the ''​items''​ property. \\ \\ Does not support ''​shorten''​ or arrays of properties. | 
-| selectTriggers | query | Return the trigger that created the event as an array in the ''​triggers''​ property. \\ \\ Does not support ''​shorten'',​ ''​count''​ or arrays of properties. | +| selectTriggers | query | Return the trigger that created the event as an array in the ''​triggers''​ property. \\ \\ Does not support ''​shorten''​ or arrays of properties. | 
-| select_alerts | query | Return alerts generated by the event in the ''​alerts''​ property. Alerts are sorted in reverse chronological order. \\ \\ Does not support ''​shorten'',​ ''​count''​ or arrays of properties. | +| select_alerts | query | Return alerts generated by the event in the ''​alerts''​ property. Alerts are sorted in reverse chronological order. \\ \\ Does not support ''​shorten''​ or arrays of properties. | 
-| select_acknowledges | query | Return event'​s acknowledges in the ''​acknowledges''​ property. Acknowledges are sorted in reverse chronological order. \\ \\ The event acknowledgement object has the following properties: \\ ''​acknowledgeid''​ - ''​(string)''​ acknowledgement'​s ID; \\ ''​userid''​ - ''​(string)''​ ID of the user that acknowledged the event; \\ ''​eventid''​ - ''​(string)''​ ID of the acknowledged event; \\ ''​clock''​ - ''​(integer)''​ time when the event was acknowledged ​as a Unix timestamp; \\ ''​message''​ - ''​(string)''​ text of the acknowledgement message; \\ ''​alias''​ - ''​(string)''​ alias of the user that acknowledged the event. \\ \\ Does not support ''​shorten''​ or arrays of properties. |+| select_acknowledges | query | Return event'​s acknowledges in the ''​acknowledges''​ property. Acknowledges are sorted in reverse chronological order. \\ \\ The event acknowledgement object has the following properties: \\ ''​acknowledgeid''​ - ''​(string)''​ acknowledgement'​s ID; \\ ''​userid''​ - ''​(string)''​ ID of the user that acknowledged the event; \\ ''​eventid''​ - ''​(string)''​ ID of the acknowledged event; \\ ''​clock''​ - ''​(timestamp)''​ time when the event was acknowledged;​ \\ ''​message''​ - ''​(string)''​ text of the acknowledgement message; \\ ''​alias''​ - ''​(string)''​ alias of the user that acknowledged the event. \\ \\ Supports ''​count'';​ does not support ''​shorten''​ or arrays of properties. |
 ^ ||| ^ |||
 | sortfield | string/​array | Sort the result by the given properties. \\ \\ Possible values are: ''​eventid'',​ ''​object''​ and ''​objectid''​. ​ | | sortfield | string/​array | Sort the result by the given properties. \\ \\ Possible values are: ''​eventid'',​ ''​object''​ and ''​objectid''​. ​ |
-| countOutput |flag|These parameters being common for all ''​get''​ methods are described in detail on the [[2.0:manual:​appendix:​api:​generic#​common_get_method_parameters|Generic Zabbix API information]] page.  | +| countOutput |flag|These parameters being common for all ''​get''​ methods are described in detail on the [[manual:​appendix:​api:​generic#​common_get_method_parameters|Generic Zabbix API information]] page.  | 
-| editable |integer|:::| +| editable |boolean|:::| 
-| excludeSearch |integer|:::|+| excludeSearch |flag|:::|
 | filter | object |:::| | filter | object |:::|
 | limit |integer|:::​| | limit |integer|:::​|
Line 44: Line 44:
 | preservekeys |flag|:::| | preservekeys |flag|:::|
 | search | object |:::| | search | object |:::|
-| searchByAny |flag|:::| +| searchByAny |boolean|:::| 
-| searchWildcardsEnabled |integer|:::| +| searchWildcardsEnabled |boolean|:::​| 
-| startSearch |integer|:::|+| sortorder | string/​array ​| ::: | 
 +| startSearch |flag|:::|
 ==== Return values ==== ==== Return values ====
  
Line 60: Line 61:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 77: Line 78:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 124: Line 125:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 141: Line 142:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 185: Line 186:
 ==== See also ==== ==== See also ====
  
-  * [[2.0:manual:​appendix:​api:​alert:​definitions|Alert]] +  * [[manual:​appendix:​api:​alert:​definitions|Alert]] 
-  * [[2.0:manual:​appendix:​api:​item:​definitions|Item]] +  * [[manual:​appendix:​api:​item:​definitions|Item]] 
-  * [[2.0:manual:​appendix:​api:​host:​definitions|Host]] +  * [[manual:​appendix:​api:​host:​definitions|Host]] 
-  * [[2.0:manual:​appendix:​api:​trigger:​definitions|Trigger]]+  * [[manual:​appendix:​api:​trigger:​definitions|Trigger]]
  
 ==== Source ==== ==== Source ====
  
 CEvent::​get() in //​frontends/​php/​api/​classes/​CEvent.php//​. CEvent::​get() in //​frontends/​php/​api/​classes/​CEvent.php//​.