This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

item.getobjects

Description

array item.getobjects(object filter)

This method allows to retrieve items that match the given filter criteria.

This method is deprecated and will be removed in the future. Please use item.get instead.

Parameters

(object) Criteria to search by.

Additionally to the standard standard item properties the following parameters are supported as search criteria.

Parameter Type Description
host string/array Technical name of the host that the item belongs to.

Return values

(array) Returns an array of objects with all properties.

Examples

Retrieving items from a host

Retrieve all items from the host "Zabbix server."

Request:

{
           "jsonrpc": "2.0",
           "method": "item.getobjects",
           "params": {
               "host": "Zabbix server"
           },
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": [
               {
                   "itemid": "23327",
                   "type": "0",
                   "snmp_community": "",
                   "snmp_oid": "",
                   "hostid": "10084",
                   "name": "Host name of zabbix_agentd running",
                   "key_": "agent.hostname",
                   "delay": "3600",
                   "history": "7",
                   "trends": "365",
                   "lastvalue": "trapper-host",
                   "lastclock": "1351088927",
                   "prevvalue": "0",
                   "state": "0",
                   "status": "0",
                   "value_type": "1",
                   "trapper_hosts": "",
                   "units": "",
                   "multiplier": "0",
                   "delta": "0",
                   "snmpv3_securityname": "",
                   "snmpv3_securitylevel": "0",
                   "snmpv3_authpassphrase": "",
                   "snmpv3_privpassphrase": "",
                   "formula": "1",
                   "error": "",
                   "lastlogsize": "0",
                   "logtimefmt": "",
                   "templateid": "23319",
                   "valuemapid": "0",
                   "delay_flex": "",
                   "params": "",
                   "ipmi_sensor": "",
                   "data_type": "0",
                   "authtype": "0",
                   "username": "",
                   "password": "",
                   "publickey": "",
                   "privatekey": "",
                   "mtime": "0",
                   "lastns": "40510111",
                   "flags": "0",
                   "filter": "",
                   "interfaceid": "1",
                   "port": "",
                   "description": "",
                   "inventory_link": "0",
                   "lifetime": "30"
               },
               {
                   "itemid": "23287",
                   "type": "0",
                   "snmp_community": "",
                   "snmp_oid": "",
                   "hostid": "10084",
                   "name": "Agent ping",
                   "key_": "agent.ping",
                   "delay": "60",
                   "history": "7",
                   "trends": "365",
                   "lastvalue": "1",
                   "lastclock": "1351090987",
                   "prevvalue": "1",
                   "state": "0",
                   "status": "0",
                   "value_type": "3",
                   "trapper_hosts": "",
                   "units": "",
                   "multiplier": "0",
                   "delta": "0",
                   "snmpv3_securityname": "",
                   "snmpv3_securitylevel": "0",
                   "snmpv3_authpassphrase": "",
                   "snmpv3_privpassphrase": "",
                   "formula": "1",
                   "error": "",
                   "lastlogsize": "0",
                   "logtimefmt": "",
                   "templateid": "10020",
                   "valuemapid": "10",
                   "delay_flex": "",
                   "params": "",
                   "ipmi_sensor": "",
                   "data_type": "0",
                   "authtype": "0",
                   "username": "",
                   "password": "",
                   "publickey": "",
                   "privatekey": "",
                   "mtime": "0",
                   "lastns": "560794191",
                   "flags": "0",
                   "filter": "",
                   "interfaceid": "1",
                   "port": "",
                   "description": "The agent always returns 1 for this item. It could be used in combination with nodata() for availability check.",
                   "inventory_link": "0",
                   "lifetime": "0"
               },
               {
                   "itemid": "23288",
                   "type": "0",
                   "snmp_community": "",
                   "snmp_oid": "",
                   "hostid": "10084",
                   "name": "Version of zabbix_agent(d) running",
                   "key_": "agent.version",
                   "delay": "3600",
                   "history": "7",
                   "trends": "365",
                   "lastvalue": "2.0.0",
                   "lastclock": "1351088888",
                   "prevvalue": "0",
                   "state": "0",
                   "status": "0",
                   "value_type": "1",
                   "trapper_hosts": "",
                   "units": "",
                   "multiplier": "0",
                   "delta": "0",
                   "snmpv3_securityname": "",
                   "snmpv3_securitylevel": "0",
                   "snmpv3_authpassphrase": "",
                   "snmpv3_privpassphrase": "",
                   "formula": "1",
                   "error": "",
                   "lastlogsize": "0",
                   "logtimefmt": "",
                   "templateid": "10059",
                   "valuemapid": "0",
                   "delay_flex": "",
                   "params": "",
                   "ipmi_sensor": "",
                   "data_type": "0",
                   "authtype": "0",
                   "username": "",
                   "password": "",
                   "publickey": "",
                   "privatekey": "",
                   "mtime": "0",
                   "lastns": "8826267",
                   "flags": "0",
                   "filter": "",
                   "interfaceid": "1",
                   "port": "",
                   "description": "",
                   "inventory_link": "0",
                   "lifetime": "0"
               }
           ],
           "id": 1
       }

See also

Source

CItem::getObject() in frontends/php/include/classes/api/services/CItem.php.