integer/array proxy.get(object parameters)

The method allows to retrieve proxies according to the given parameters.

This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See User roles for more information.


(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 a hosts property with the hosts monitored by the proxy.
selectInterface query Return an interface property with the proxy interface used by a passive proxy.
sortfield string/array Sort the result by the given properties.

Possible values: hostid, host, status.
countOutput boolean These parameters being common for all get methods are described in detail in the reference commentary.
editable boolean
excludeSearch boolean
filter object
limit integer
output query
preservekeys boolean
search object
searchByAny boolean
searchWildcardsEnabled boolean
sortorder string/array
startSearch boolean

Return values

(integer/array) Returns either:

  • an array of objects;
  • the count of retrieved objects, if the countOutput parameter has been used.


Retrieve all proxies

Retrieve all configured proxies and their interfaces.


           "jsonrpc": "2.0",
           "method": "proxy.get",
           "params": {
               "output": "extend",
               "selectInterface": "extend"
           "id": 1


           "jsonrpc": "2.0",
           "result": [
                   "host": "Active proxy",
                   "status": "5",
                   "description": "",
                   "tls_connect": "1",
                   "tls_accept": "1",
                   "tls_issuer": "",
                   "tls_subject": "",
                   "proxy_address": "",
                   "auto_compress": "0",
                   "version": "60400",
                   "compatibility": "1",
                   "proxyid": "30091",
                   "interface": []
                   "host": "Passive proxy",
                   "status": "6",
                   "description": "",
                   "tls_connect": "1",
                   "tls_accept": "1",
                   "tls_issuer": "",
                   "tls_subject": "",
                   "proxy_address": "",
                   "auto_compress": "0",
                   "lastaccess": "0",
                   "version": "0",
                   "compatibility": "0",
                   "proxyid": "30092",
                   "interface": {
                       "interfaceid": "30109",
                       "hostid": "30092",
                       "main": "1",
                       "type": "0",
                       "useip": "1",
                       "ip": "",
                       "dns": "",
                       "port": "10051",
                       "available": "0",
                       "error": "",
                       "errors_from": "0",
                       "disable_until": "0",
                       "details": []
           "id": 1

See also


CProxy::get() in ui/include/classes/api/services/CProxy.php.