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:
{
"jsonrpc": "2.0",
"result": [
{
"parent_itemid": "27426",
"name": "Disk space usage {#FSNAME}",
"width": "600",
"height": "340",
"yaxismin": "0.0000",
"yaxismax": "0.0000",
"templateid": "442",
"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",
"discover": "0"
}
],
"id": 1
Source
CGraphPrototype::get() in ui/include/classes/api/services/CGraphPrototype.php.