diff --git a/html/api_v0.php b/html/api_v0.php index cae760ae5..774d81967 100644 --- a/html/api_v0.php +++ b/html/api_v0.php @@ -36,8 +36,8 @@ $app->group('/api', function() use ($app) { $app->get('/:hostname/ports/:ifname', 'authToken', 'get_port_stats_by_port_hostname')->name('get_port_stats_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName $app->get('/:hostname/ports/:ifname/:type', 'authToken', 'get_graph_by_port_hostname')->name('get_graph_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName/$type }); - $app->group('/graphs', function() use ($app) { - $app->get('/ports/:group', 'authToken', 'get_graph_by_group')->name('get_graph_by_group');//api/v0/graphs/ports/$group + $app->group('/portgroups', function() use ($app) { + $app->get('/:group', 'authToken', 'get_graph_by_group')->name('get_graph_by_portgroup');//api/v0/portgroups/$group }); $app->get('/devices', 'authToken', 'list_devices')->name('list_devices');//api/v0/devices $app->post('/devices', 'authToken', 'add_device')->name('add_device');//api/v0/devices (json data needs to be passed) diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php index a0a6e1a23..607c4cacd 100644 --- a/html/includes/api_functions.inc.php +++ b/html/includes/api_functions.inc.php @@ -377,7 +377,7 @@ function list_bgp() { echo _json_encode($output); } -function get_graph_by_group() { +function get_graph_by_portgroup() { global $config; $app = \Slim\Slim::getInstance(); $router = $app->router()->getCurrentRoute()->getParams(); diff --git a/html/pages/api-docs.inc.php b/html/pages/api-docs.inc.php index 3cf213939..4fe166783 100644 --- a/html/pages/api-docs.inc.php +++ b/html/pages/api-docs.inc.php @@ -164,7 +164,7 @@ if ($_SESSION['userlevel'] == '10') /api /v0 - /graphs/ports/$group + /portgroups/$group