[comment]: # translation:outdated

[comment]: # ({70dbc2c9-70dbc2c9})
# proxy.get

[comment]: # ({/70dbc2c9-70dbc2c9})

[comment]: # ({b91ae38b-b91ae38b})
### Leírás

`integer/array proxy.get(objektumparaméterek)`

A módszer lehetővé teszi a proxy-k lekérését a megadott paraméterek szerint.

::: noteclassic
Ez a módszer bármilyen típusú felhasználó számára elérhető. Engedélyek
A metódus meghívása a felhasználói szerepkör beállításaiban visszavonható. Lásd: [User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
további információért.
:::

[comment]: # ({/b91ae38b-b91ae38b})

[comment]: # ({new-74f0aaac})
### Parameters

`(object)` Parameters defining the desired output.

The method supports the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|proxyids|string/array|Return only proxies with the given IDs.|
|selectHosts|query|Return a [hosts](/manual/api/reference/host/object) property with the hosts monitored by the proxy.|
|selectInterface|query|Return an [interface](/manual/api/reference/proxy/object#proxy_interface) property with the proxy interface used by a passive proxy.|
|sortfield|string/array|Sort the result by the given properties.<br><br>Possible values are: `hostid`, `host` and `status`.|
|countOutput|boolean|These parameters being common for all `get` methods are described in detail in the [reference commentary](/manual/api/reference_commentary#common_get_method_parameters).|
|editable|boolean|^|
|excludeSearch|boolean|^|
|filter|object|^|
|limit|integer|^|
|output|query|^|
|preservekeys|boolean|^|
|search|object|^|
|searchByAny|boolean|^|
|searchWildcardsEnabled|boolean|^|
|sortorder|string/array|^|
|startSearch|boolean|^|

[comment]: # ({/new-74f0aaac})

[comment]: # ({7223bab1-7223bab1})
### Visszatérési értékek

`(integer/array)` A következőket adja vissza:

- objektumok tömbje;
- a letöltött objektumok száma, ha a `countOutput` paraméter használva volt.

[comment]: # ({/7223bab1-7223bab1})

[comment]: # ({new-b41637d2})
### Examples

[comment]: # ({/new-b41637d2})

[comment]: # ({new-b40fb513})
#### Retrieve all proxies

Retrieve all configured proxies and their interfaces.

Request:

```json
{
    "jsonrpc": "2.0",
    "method": "proxy.get",
    "params": {
        "output": "extend",
        "selectInterface": "extend"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": [
        {
            "host": "Active proxy",
            "status": "5",
            "lastaccess": "0",
            "description": "",
            "tls_connect": "1",
            "tls_accept": "1",
            "tls_issuer": "",
            "tls_subject": "",
            "proxy_address": "",
            "auto_compress": "0",
            "proxyid": "30091",
            "interface": []
        },
        {
            "host": "Passive proxy",
            "status": "6",
            "lastaccess": "0",
            "description": "",
            "tls_connect": "1",
            "tls_accept": "1",
            "tls_issuer": "",
            "tls_subject": "",
            "proxy_address": "",
            "auto_compress": "0",
            "proxyid": "30092",
            "interface": {
                "interfaceid": "30109",
                "hostid": "30092",
                "useip": "1",
                "ip": "127.0.0.1",
                "dns": "",
                "port": "10051"
            ]
        }
    ],
    "id": 1
}
```

[comment]: # ({/new-b40fb513})

[comment]: # ({273e0fd8-273e0fd8})
### Lásd még

- [Host](/manual/api/reference/host/object#host)
- [Proxy interfész](object#proxy_interface)

[comment]: # ({/273e0fd8-273e0fd8})

[comment]: # ({b9a96f2c-b9a96f2c})
### Forrás

CProxy::get() az *ui/include/classes/api/services/CProxy.php*-ban.

[comment]: # ({/b9a96f2c-b9a96f2c})
