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:image:get

Table of Contents

get()

Available since version: 1.8
This function allows you to retrieve image 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
imageidsarrayImage IDs
sysmapidsarrayMap IDs
editableintegeronly with read-write permission. Ignored for SuperAdmins
filterarrayOptional filter by image fields
searcharrayReturn images by any given image object field pattern
startSearchintegerSearch images field pattern only in start of the field
excludeSearchintegerExclude from result, images by given field pattern
searchWildcardsEnabledintegerSearch pattern in whole field using wildcards 1 - enable, 0 - disable
outputstringOutput options Values: shorten, refer, extend
select_imagestringSelect image source
countOutputintegerCount images, return the number of images found
preservekeysintegerReturn hash instead of array Keys of hash are object IDs
sortfieldstringSort by image field Values: imageid, name
sortorderstringSort order Values: ASC, DESC
limitintmax number of image objects to return

Returns

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

Example

Get images details by image description “Hub” and “UPS”, return only image details, without image source:

{
"jsonrpc":"2.0",
"method":"image.get",
"params":{
	"filter": {"name": ["Hub", "UPS"]},
	"output": "extend"
},
"auth":"6f38cddc44cfbb6c1bd186f9a220b5a0",
"id":2
}

Retrieved images details:

{
"jsonrpc":"2.0",
"result":[
	{
		"imageid":"100100000000001",
		"imagetype":"1",
		"name":"Hub"
	},
	{
		"imageid":"100100000000017",
		"imagetype":"1",
		"name":"UPS"
	}
],
"id":2
}