This is an old revision of the document!
integer/array proxy.get(object parameters)
The method allows to retrieve proxies according to the given parameters.
(object)
Parameters defining the desired output.
The method supports the following parameters.
Parameter | Type | Description |
---|---|---|
proxyids | string/array | Return only proxies with the given IDs. |
selectHosts | query | Return hosts monitored by the proxy in the hosts property. |
selectInterface | query | Return the proxy interface used by a passive proxy in the interface property. |
sortfield | string/array | Sort the result by the given properties. Possible values are: hostid , host and status . |
countOutput | flag | These parameters being common for all get methods are described in detail in the reference commentary. |
editable | boolean | |
excludeSearch | flag | |
filter | object | |
limit | integer | |
nodeids | string/array | |
output | query | |
preservekeys | flag | |
search | object | |
searchByAny | boolean | |
searchWildcardsEnabled | boolean | |
sortorder | string/array | |
startSearch | flag | |
(deprecated) | query | Return the proxy interface used by a passive proxy as an array in the interfaces property. |
(integer/array)
Returns either:
countOutput
parameter has been used.Retrieve all configured proxies and their interfaces.
Request:
{ "jsonrpc": "2.0", "method": "proxy.get", "params": { "output": "extend", "selectInterface": "extend" }, "auth": "038e1d7b1735c6a5436ee9eae095879e", "id": 1 }
Response:
{ "jsonrpc": "2.0", "result": [ { "proxy_hostid": "0", "host": "Active proxy", "status": "5", "disable_until": "0", "error": "", "available": "0", "errors_from": "0", "lastaccess": "0", "ipmi_authtype": "0", "ipmi_privilege": "2", "ipmi_username": "", "ipmi_password": "", "ipmi_disable_until": "0", "ipmi_available": "0", "snmp_disable_until": "0", "snmp_available": "0", "maintenanceid": "0", "maintenance_status": "0", "maintenance_type": "0", "maintenance_from": "0", "ipmi_errors_from": "0", "snmp_errors_from": "0", "ipmi_error": "", "snmp_error": "", "jmx_disable_until": "0", "jmx_available": "0", "jmx_errors_from": "0", "jmx_error": "", "name": "", "flags": "0", "templateid": "0", "description": "", "proxyid": "30091", "interface": [] }, { "proxy_hostid": "0", "host": "Passive proxy", "status": "6", "disable_until": "0", "error": "", "available": "0", "errors_from": "0", "lastaccess": "0", "ipmi_authtype": "0", "ipmi_privilege": "2", "ipmi_username": "", "ipmi_password": "", "ipmi_disable_until": "0", "ipmi_available": "0", "snmp_disable_until": "0", "snmp_available": "0", "maintenanceid": "0", "maintenance_status": "0", "maintenance_type": "0", "maintenance_from": "0", "ipmi_errors_from": "0", "snmp_errors_from": "0", "ipmi_error": "", "snmp_error": "", "jmx_disable_until": "0", "jmx_available": "0", "jmx_errors_from": "0", "jmx_error": "", "name": "", "flags": "0", "templateid": "0", "description": "", "proxyid": "30092", "interface": { "interfaceid": "30109", "hostid": "30092", "main": "1", "type": "0", "useip": "1", "ip": "127.0.0.1", "dns": "", "port": "10051" ] } ], "id": 1 }
CProxy::get() in frontends/php/api/classes/CProxy.php.