The method allows to retrieve graph prototypes according to the given parameters.

    This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See for more information.

    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 graph prototypes from a LLD rule

    Retrieve all graph prototypes from an LLD rule.

    Request:

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    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_triggers": "0",
    13. "graphtype": "2",
    14. "show_legend": "1",
    15. "show_3d": "1",
    16. "percent_left": "0.0000",
    17. "ymin_type": "0",
    18. "ymax_type": "0",
    19. "ymin_itemid": "0",
    20. "ymax_itemid": "0",
    21. "discover": "0"
    22. }
    23. ],
    24. "id": 1

    Source

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