Added /vlans/:hostname route to the API

This commit is contained in:
laf
2014-10-01 20:49:34 +01:00
parent 10e24653be
commit b8a2b7c291
3 changed files with 51 additions and 0 deletions
+3
View File
@@ -35,6 +35,9 @@ $app->group('/api', function() use ($app) {
$app->get('/:hostname/ports/:ifname', 'authToken', 'get_port_stats_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName
$app->get('/:hostname/ports/:ifname/:type', 'authToken', 'get_graph_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName/$type
});
$app->group('/vlans', function() use ($app) {
$app->get('/:hostname', 'authToken', 'get_vlans');//api/v0/vlans/$hostname
});
$app->get('/devices', 'authToken', 'list_devices');//api/v0/devices
$app->post('/devices', 'authToken', 'add_device');//api/v0/devices (json data needs to be passed)
$app->delete('/devices/:hostname', 'authToken', 'del_device');//api/v0/devices (json data needs to be passed)