This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
manual:api:reference:host:get [2014/09/25 14:43] sasha Page moved from 2.4:manual:api:reference:host:get to manual:api:reference:host:get |
manual:api:reference:host:get [2019/01/28 14:49] (current) sasha <code js> => <code java> |
||
---|---|---|---|
Line 42: | Line 42: | ||
^ ||| | ^ ||| | ||
|selectGroups|query|Return the host groups that the host belongs to in the ''groups'' property. | | |selectGroups|query|Return the host groups that the host belongs to in the ''groups'' property. | | ||
- | |selectApplications|query|Return the applications from the host in the ''applications'' property. \\ \\ Support ''count''. | | + | |selectApplications|query|Return the applications from the host in the ''applications'' property. \\ \\ Supports ''count''. | |
|selectDiscoveries|query|Return the low level discoveries from the host in the ''discoveries'' property. \\ \\ Supports ''count''. | | |selectDiscoveries|query|Return the low level discoveries from the host in the ''discoveries'' property. \\ \\ Supports ''count''. | | ||
- | | selectDiscoveryRule | query | Return the LLD rule that created the host in the ''discoveryRule'' property. | | + | |selectDiscoveryRule | query | Return the LLD rule that created the host in the ''discoveryRule'' property. | |
|selectGraphs|query|Return the graphs from the host in the ''graphs'' property. \\ \\ Supports ''count''. | | |selectGraphs|query|Return the graphs from the host in the ''graphs'' property. \\ \\ Supports ''count''. | | ||
- | | selectHostDiscovery | query | Return the host discovery object in the ''hostDiscovery'' property. \\ \\ The host discovery object links a discovered host to a host prototype or a host prototypes to an LLD rule and has the following properties: \\ ''host'' - //(string)// host of the host prototype; \\ ''hostid'' - //(string)// ID of the discovered host or host prototype; \\ ''parent_hostid'' - //(string)// ID of the host prototype from which the host has been created; \\ ''parent_itemid'' - //(string)// ID of the LLD rule that created the discovered host; \\ ''lastcheck'' - //(timestamp)// time when the host was last discovered; \\ ''ts_delete'' - //(timestamp)// time when a host that is no longer discovered will be deleted. | | + | |selectHostDiscovery | query | Return the host discovery object in the ''hostDiscovery'' property. \\ \\ The host discovery object links a discovered host to a host prototype or a host prototypes to an LLD rule and has the following properties: \\ ''host'' - //(string)// host of the host prototype; \\ ''hostid'' - //(string)// ID of the discovered host or host prototype; \\ ''parent_hostid'' - //(string)// ID of the host prototype from which the host has been created; \\ ''parent_itemid'' - //(string)// ID of the LLD rule that created the discovered host; \\ ''lastcheck'' - //(timestamp)// time when the host was last discovered; \\ ''ts_delete'' - //(timestamp)// time when a host that is no longer discovered will be deleted. | |
|selectHttpTests|query|Return the web scenarios from the host in the ''httpTests'' property. \\ \\ Supports ''count''. | | |selectHttpTests|query|Return the web scenarios from the host in the ''httpTests'' property. \\ \\ Supports ''count''. | | ||
|selectInterfaces|query|Return the host interfaces in the ''interfaces'' property. \\ \\ Supports ''count''. | | |selectInterfaces|query|Return the host interfaces in the ''interfaces'' property. \\ \\ Supports ''count''. | | ||
Line 61: | Line 61: | ||
|searchInventory | object | Return only hosts that have inventory data matching the given wildcard search. \\ \\ This parameter is affected by the same additional parameters as ''search''. | | |searchInventory | object | Return only hosts that have inventory data matching the given wildcard search. \\ \\ This parameter is affected by the same additional parameters as ''search''. | | ||
|sortfield|string/array| Sort the result by the given properties. \\ \\ Possible values are: ''hostid'', ''host'', ''name'', ''status''. | | |sortfield|string/array| Sort the result by the given properties. \\ \\ Possible values are: ''hostid'', ''host'', ''name'', ''status''. | | ||
- | |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|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]]. | |
| editable |boolean|:::| | | editable |boolean|:::| | ||
| excludeSearch |flag|:::| | | excludeSearch |flag|:::| | ||
Line 84: | Line 84: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 103: | Line 103: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 184: | Line 184: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 203: | Line 203: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 234: | Line 234: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 252: | Line 252: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 279: | Line 279: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 300: | Line 300: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 325: | Line 325: | ||
==== See also ==== | ==== See also ==== | ||
- | * [[2.4:manual:api:reference:host:getobjects|host.getobjects]] | + | * [[getobjects|host.getobjects]] |
- | * [[2.4:manual:api:reference:hostgroup:object#host_group|Host group]] | + | * [[manual:api:reference:hostgroup:object#host_group|Host group]] |
- | * [[2.4:manual:api:reference:template:object#template|Template]] | + | * [[manual:api:reference:template:object#template|Template]] |
- | * [[2.4:manual:api:reference:usermacro:object#hosttemplate_level_macro|User macro]] | + | * [[manual:api:reference:usermacro:object#hosttemplate_level_macro|User macro]] |
- | * [[2.4:manual:api:reference:hostinterface:object#host_interface|Host interface]] | + | * [[manual:api:reference:hostinterface:object#host_interface|Host interface]] |
==== Source ==== | ==== Source ==== | ||
- | CHost::get() in //frontends/php/api/classes/CHost.php//. | + | CHost::get() in //frontends/php/include/classes/api/services/CHost.php//. |