Add function to get information about a single device

This commit is contained in:
Paul Gear
2014-09-27 15:25:43 +10:00
parent a58c857ed2
commit 76f5ab87a9
3 changed files with 62 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ $app->setName('api');
$app->group('/api', function() use ($app) {
$app->group('/v0', function() use ($app) {
$app->group('/devices', function() use ($app) {
$app->get('/:hostname', 'authToken', 'get_device');//api/v0/devices/$hostname
$app->get('/:hostname/ports/:ifname/:type', 'authToken', 'get_graph_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName/$type
$app->get('/:hostname/:type', 'authToken', 'get_graph_generic_by_hostname');//api/v0/devices/$hostname/$type
$app->get('/:hostname/ports/:ifname', 'authToken', 'get_port_stats_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName