API Docs

Get to know bandwidth_graph

Overview: bandwidth_graph retrieves a PNG representation of a machine’s bandwidth utilization as a base64 encoded string.

bandwidth_graph expects the following parameters:


  • device_id – The identifier of a device.
  • [timeframe] – The time period for the graph (hour, day, week, month, lastmonth).

Example:

$params = array(
    'device_id' => 8347,
    'timeframe' => 'lastmonth'
);

$api->call('device.bandwidth_graph', $params);

Output:

Array
(
    [status] => 1
    [data] => Array
        (
             [base64 encoded string]
        )
)