The method allows to retrieve graph prototypes according to the given parameters.此方法允许按照给定的参数检索图形原型。
Parameters参数
(object)
Parameters defining the desired output.(object)
参数定义需要的输出
The method supports the following parameters.此方法支持以下参数。
(integer/array)
Returns either:
an array of objects;
(整数型/数组型)
返回两个中的一个:
一个数组对象;
如果
countOutput
参数被使用,将对检索到的对象进行计数。
Examples示例
Retrieving graph prototypes from a LLD rule从一个低级发现规则检索图形原型
Retrieve all graph prototypes from an LLD rule.从一个低级发现规则检索图形原型
Request请求:
- {
- "jsonrpc": "2.0",
- "result": [
- "graphid": "1017",
- "parent_itemid": "27426",
- "name": "Disk space usage {#FSNAME}",
- "width": "600",
- "height": "340",
- "yaxismin": "0.0000",
- "yaxismax": "0.0000",
- "templateid": "442",
- "show_work_period": "0",
- "show_triggers": "0",
- "graphtype": "2",
- "show_legend": "1",
- "show_3d": "1",
- "percent_left": "0.0000",
- "ymin_type": "0",
- "ymax_type": "0",
- "ymin_itemid": "0",
- "ymax_itemid": "0"
- }
- ],
- "id": 1
- }
Source来源
CGraphPrototype::get() in frontends/php/include/classes/api/services/CGraphPrototype.php.