array graph.getobjects(object filter)
This method allows to retrieve graphs that match the given filter criteria.
(object)
Criteria to search by.
Additionally to the standard standard graph properties the following parameters are supported as search criteria.
Parameter | Type | Description |
---|---|---|
node | string | Name of the node the graphs must belong to. This will override the nodeids parameter. |
nodeids | string/array | ID of the node the graphs must belong to. |
(array)
Returns an array of objects with all properties.
Retrieve all graphs from host "Zabbix server".
Request:
{
"jsonrpc": "2.0",
"method": "graph.getobjects",
"params": {
"host": "Zabbix server"
},
"auth": "3a57200802b24cda67c4e4010b50c065",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": [
{
"graphid": "612",
"name": "CPU jumps",
"width": "900",
"height": "200",
"yaxismin": "0.0000",
"yaxismax": "100.0000",
"templateid": "439",
"show_work_period": "1",
"show_triggers": "1",
"graphtype": "0",
"show_legend": "1",
"show_3d": "0",
"percent_left": "0.0000",
"percent_right": "0.0000",
"ymin_type": "0",
"ymax_type": "0",
"ymin_itemid": "0",
"ymax_itemid": "0",
"flags": "0"
},
{
"graphid": "613",
"name": "CPU load",
"width": "900",
"height": "200",
"yaxismin": "0.0000",
"yaxismax": "100.0000",
"templateid": "433",
"show_work_period": "1",
"show_triggers": "1",
"graphtype": "0",
"show_legend": "1",
"show_3d": "0",
"percent_left": "0.0000",
"percent_right": "0.0000",
"ymin_type": "1",
"ymax_type": "0",
"ymin_itemid": "0",
"ymax_itemid": "0",
"flags": "0"
},
{
"graphid": "614",
"name": "CPU utilization",
"width": "900",
"height": "200",
"yaxismin": "0.0000",
"yaxismax": "100.0000",
"templateid": "387",
"show_work_period": "1",
"show_triggers": "0",
"graphtype": "1",
"show_legend": "1",
"show_3d": "0",
"percent_left": "0.0000",
"percent_right": "0.0000",
"ymin_type": "1",
"ymax_type": "1",
"ymin_itemid": "0",
"ymax_itemid": "0",
"flags": "0"
}
],
"id": 1
}
CGraph::getObject() in frontends/php/api/classes/CGraph.php.