Update api route to portgroups

This commit is contained in:
laf
2014-11-24 04:10:21 +00:00
parent 213ba09f9f
commit c980c467d8
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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)