[comment]: # translation:outdated

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

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

[comment]: # ({fea54630-b91ae38b})
### Опис

`integer/array proxy.get(object parameters)`

Метод омогућава преузимање проксија према датим параметрима.

::: noteclassic
Овај метод је доступан корисницима било које врсте. Дозволе за позивање методе могу се опозвати у подешавањима улоге корисника. Види
[Улоге корисника](/manual/web_interface/frontend_sections/users/user_roles) за више информација.
:::

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

[comment]: # ({d925626a-74f0aaac})
### Параметри

`(object)` Параметри који дефинишу жељени излаз.

Овај метод подржава следеће параметре.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|proxyids|ID/array|Враћа само проксије са датим ID-ијевима.|
|selectAssignedHosts|query|Враћа својство [`assignedHosts`](/manual/api/reference/host/object) са домаћинима додељеним проксију.<br><br>Подржава `count`.|
|selectHosts|query|Враћа својство [`hosts`](/manual/api/reference/host/object) са домаћинима које надгледа прокси.<br><br>Подржава `count`.|
|selectProxyGroup|query|Враћа својство [`proxyGroup`](/manual/api/reference/proxygroup/object) са објектом прокси групе.|
|sortfield|string/array|Сортира резултат према датим својствима.<br><br>Могуће вредности: `proxyid`, `name`, `operating_mode`.|
|countOutput|boolean|Ови параметри су заједнички за све `get` методе, описани су детаљно у [референтном коментару](/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]: # ({/d925626a-74f0aaac})

[comment]: # ({07ca11ca-7223bab1})
### Повратне вредности

`(integer/array)` Враћа или:

-  низ објеката;
-  број преузетих објеката, ако је коришћен параметар `countOutput `.

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

[comment]: # ({b41637d2-b41637d2})
### Примери

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

[comment]: # ({eace8ca8-b40fb513})
#### Преузимање свих проксија

Преузмите све конфигурисане прокси сервере и њихове интерфејсе.

[Захтев](/manual/api#performing-requests):

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

Одговор:

```json
{
    "jsonrpc": "2.0",
    "result": [
        {
            "proxyid": "11",
            "name": "Active proxy",
            "proxy_groupid": "0",
            "local_address": "",
            "local_port": "10051",
            "operating_mode": "0",
            "description": "",
            "allowed_addresses": "",
            "address": "127.0.0.1",
            "port": "10051",
            "tls_connect": "1",
            "tls_accept": "1",
            "tls_issuer": "",
            "tls_subject": "",
            "custom_timeouts": "0",
            "timeout_zabbix_agent": "",
            "timeout_simple_check": "",
            "timeout_snmp_agent": "",
            "timeout_external_check": "",
            "timeout_db_monitor": "",
            "timeout_http_agent": "",
            "timeout_ssh_agent": "",
            "timeout_telnet_agent": "",
            "timeout_script": "",
            "last_access": "1693391880",
            "version": "70000",
            "compatibility": "1",
            "state": "1"
        },
        {
            "proxyid": "12",
            "name": "Passive proxy",
            "proxy_groupid": "1",
            "local_address": "127.0.0.1",
            "local_port": "10051",
            "operating_mode": "1",
            "description": "",
            "allowed_addresses": "",
            "address": "127.0.0.1",
            "port": "10051",
            "tls_connect": "1",
            "tls_accept": "1",
            "tls_issuer": "",
            "tls_subject": "",
            "custom_timeouts": "1",
            "timeout_zabbix_agent": "5s",
            "timeout_simple_check": "5s",
            "timeout_snmp_agent": "5s",
            "timeout_external_check": "5s",
            "timeout_db_monitor": "5s",
            "timeout_http_agent": "5s",
            "timeout_ssh_agent": "5s",
            "timeout_telnet_agent": "5s",
            "timeout_script": "5s",
            "lastaccess": "1693391875",
            "version": "60400",
            "compatibility": "2",
            "state": "2"
        }
    ],
    "id": 1
}
```

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

[comment]: # ({c85eaabc-273e0fd8})
### Погледајте такође

-  [Домаћин](/manual/api/reference/host/object#host)
-  [Прокси група](/manual/api/reference/proxygroup/object#proxy_group)

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

[comment]: # ({b9a96f2c-b9a96f2c})
### Извор

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

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