The method allows to retrieve item prototypes according to the given parameters.该方法允许根据给定的参数检索item prototypes。
Parameters 参数
(object)
Parameters defining the desired output.定义所需输出的参数。
The method supports the following parameters.该方法支持以下参数。
(integer/array)
Returns either:
the count of retrieved objects, if the
countOutput
parameter has been used.
Examples示例
Retrieving item prototypes from an LLD rule
Retrieve all item prototypes from an LLD rule.
Request:
Response:
- {
- "jsonrpc": "2.0",
- "result": [
- {
- "itemid": "27427",
- "type": "0",
- "snmp_community": "",
- "snmp_oid": "",
- "hostid": "10202",
- "name": "Incoming network traffic on $1 23",
- "key_": "2net.if.in[{#IFNAME}]",
- "delay": "1m",
- "history": "7d",
- "trends": "365d",
- "status": "0",
- "value_type": "3",
- "trapper_hosts": "",
- "units": "bps",
- "multiplier": "1",
- "delta": "1",
- "snmpv3_securityname": "",
- "snmpv3_securitylevel": "0",
- "snmpv3_authpassphrase": "",
- "snmpv3_privpassphrase": "",
- "logtimefmt": "",
- "templateid": "23881",
- "valuemapid": "0",
- "params": "",
- "ipmi_sensor": "",
- "data_type": "0",
- "authtype": "0",
- "username": "",
- "password": "",
- "publickey": "",
- "privatekey": "",
- "mtime": "0",
- "filter": "",
- "interfaceid": "119",
- "port": "",
- "description": "",
- "snmpv3_authprotocol": "0",
- "snmpv3_privprotocol": "0"
- },
- {
- "itemid": "27428",
- "type": "0",
- "snmp_community": "",
- "snmp_oid": "",
- "hostid": "10202",
- "name": "Incoming network traffic on $1",
- "key_": "net.if.in[{#IFNAME}]",
- "delay": "1m",
- "history": "7d",
- "trends": "365d",
- "status": "0",
- "value_type": "3",
- "trapper_hosts": "",
- "multiplier": "1",
- "delta": "1",
- "snmpv3_securityname": "",
- "snmpv3_securitylevel": "0",
- "snmpv3_authpassphrase": "",
- "snmpv3_privpassphrase": "",
- "formula": "8",
- "logtimefmt": "",
- "templateid": "22446",
- "valuemapid": "0",
- "params": "",
- "ipmi_sensor": "",
- "data_type": "0",
- "authtype": "0",
- "username": "",
- "password": "",
- "publickey": "",
- "privatekey": "",
- "mtime": "0",
- "filter": "",
- "interfaceid": "119",
- "port": "",
- "description": "",
- "snmpv3_authprotocol": "0",
- "snmpv3_privprotocol": "0"
- }
- ],
- "id": 1
- }
Source 来源
CItemPrototype::get() in frontends/php/include/classes/api/services/CItemPrototype.php.