Это перевод страницы документации с английского языка. Помогите нам сделать его лучше.

proxygroup.get

Описание

integer/array proxygroup.get(параметры объекта)

Метод позволяет получать группы прокси по заданным параметрам.

Этот метод доступен пользователям любого типа. Разрешения на вызов метода можно отозвать в настройках ролей пользователя. Дополнительную информацию см. в разделе Роли пользователей.

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

Return values

(integer/array) Returns either:

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

Примеры

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
       }

See also

Source

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