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

proxygroup.get

説明

integer/array proxygroup.get(object parameters)

このメソッドは、指定したパラメーターに応じたプロキシグループを取得できます。

このメソッドは、すべてのタイプのユーザーが利用できます。メソッドを呼び出す権限は、ユーザーの役割の設定で取り消すことができます。詳細はユーザーの役割を参照してください。

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

戻り値

(integer/array) 次のいずれかを返します:

  • オブジェクトの配列
  • countOutputパラメータが使用されている場合、取得されたオブジェクトの数

全てのプロキシグループの取得

すべての構成済みのプロキシとプロキシグループを取得します。

リクエスト :

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

レスポンス :

{
           "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
       }

参照

ソース

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