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请求:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. "graphid": "1017",
    5. "parent_itemid": "27426",
    6. "name": "Disk space usage {#FSNAME}",
    7. "width": "600",
    8. "height": "340",
    9. "yaxismin": "0.0000",
    10. "yaxismax": "0.0000",
    11. "templateid": "442",
    12. "show_work_period": "0",
    13. "show_triggers": "0",
    14. "graphtype": "2",
    15. "show_legend": "1",
    16. "show_3d": "1",
    17. "percent_left": "0.0000",
    18. "ymin_type": "0",
    19. "ymax_type": "0",
    20. "ymin_itemid": "0",
    21. "ymax_itemid": "0"
    22. }
    23. ],
    24. "id": 1
    25. }

    Source来源

    CGraphPrototype::get() in frontends/php/include/classes/api/services/CGraphPrototype.php.