This is a translation of the original English documentation page. Help us make it better.

proxygroup.get

Description

integer/array proxygroup.get(object parameters)

The method allows to retrieve proxy groups 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.

Parameters

(object) Parameters defining the desired output.

The method supports the following parameters.

Parameter Type Description
proxy_groupids ID/array Return only proxy groups with the given IDs.
proxyids ID/array Return only proxy groups that contain the given proxies.
selectProxies query Return a proxies property with the proxies that belong to the proxy group.

Supports count.
sortfield string/array Sort the result by the given properties.

Possible values: proxy_groupid, name.
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

Retourwaarden

(integer/array) Geeft ofwel:

  • een reeks objecten;
  • het aantal opgehaalde objecten, als de parameter countOutput is gebruikt.

Voorbeelden

Retrieve all proxy groups

Retrieve all configured proxy groups with proxies.

Request:

{
           "jsonrpc": "2.0",
           "method": "proxygroup.get",
           "params": {
               "output": "extend",
               "selectProxies": ["proxyid", "name"]
           },
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": [
               {
                   "proxy_groupid": "1",
                   "name": "Proxy group 1",
                   "failover_delay": "1m",
                   "min_online": "3",
                   "description": "",
                   "state": "1",
                   "proxies": [
                       {
                           "proxyid": "1",
                           "name": "proxy 1"
                       },
                       {
                           "proxyid": "2",
                           "name": "proxy 2"
                       }
                   ]
               },
               {
                   "proxy_groupid": "2",
                   "name": "Proxy group 2",
                   "failover_delay": "10m",
                   "min_online": "3",
                   "description": "",
                   "state": "3",
                   "proxies": [
                       {
                           "proxyid": "3",
                           "name": "proxy 3"
                       },
                       {
                           "proxyid": "4",
                           "name": "proxy 4"
                       },
                       {
                           "proxyid": "5",
                           "name": "proxy 5"
                       }
                   ]
               }
           ],
           "id": 1
       }

Zie ook

Bron

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