Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

api:proxy:get

Table of Contents

get()

Available since version: 1.8
This function allows you to retrieve proxy details based on filtering options. All parameters are optional. If parameter is set in query this option counted as ON, except if parameter is equal to NULL.

Parameters

ParameterTypeDescriptionDetails
nodeidsarrayNode IDs
proxyidsarrayProxy IDs
editableintegeronly with read-write permission. Ignored for SuperAdmins
filterarrayOptional filter by proxy fields
searcharrayReturn proxies by any given proxy object field pattern
startSearchintegerSearch proxies field pattern only in start of the field
excludeSearchintegerExclude from result, proxies by given field pattern
searchWildcardsEnabledintegerSearch pattern in whole field using wildcards 1 - enable, 0 - disable
outputstringOutput options Values: shorten, refer, extend
select_hostsstringSelect hosts Values: shorten, refer, extend
countOutputintegerCount proxies, return the number of proxies found
preservekeysintegerReturn hash instead of array Keys of hash are object IDs
sortfieldstringSort by proxy field Values: hostid,host,status
sortorderstringSort order Values: ASC, DESC
limitintmax number of proxy objects to return

Returns

ParameterDescription
resultOperation successful. Result will contain array of Proxy objects.
errorIn case of any errors

Example

Get proxys details by proxy name pattern “proxy”:

{
"jsonrpc":"2.0",
"method":"proxy.get",
"params":{
	"output":"extend",
	"search":{
		"host":["proxy"]
	}
},
"auth":"6f38cddc44cfbb6c1bd186f9a220b5a0",
"id":2
}
Retrieved proxy details:

{
"jsonrpc":"2.0",
"result":[{
	"proxyid":"100100000010017",
	"host":"Linux Proxy",
	"status":"0"
},{
	"proxyid":"100100000010229",
	"host":"ZABBIX Proxy",
	"status": 6
}],
"id":2
}