mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Tidy API entry points & doc; error if something other than image/png is asked for from portgroup graphs
This commit is contained in:
+5
-5
@@ -29,20 +29,20 @@ $app->setName('api');
|
||||
|
||||
$app->group('/api', function() use ($app) {
|
||||
$app->group('/v0', function() use ($app) {
|
||||
$app->get('/bgp', 'authToken', 'list_bgp')->name('list_bgp');//api/v0/bgp
|
||||
$app->group('/devices', function() use ($app) {
|
||||
$app->delete('/:hostname', 'authToken', 'del_device')->name('del_device');//api/v0/devices/$hostname
|
||||
$app->get('/:hostname', 'authToken', 'get_device')->name('get_device');//api/v0/devices/$hostname
|
||||
$app->get('/:hostname/vlans', 'authToken', 'get_vlans')->name('get_vlans');//api/v0/devices/$hostname/vlans
|
||||
$app->get('/:hostname/:type', 'authToken', 'get_graph_generic_by_hostname')->name('get_graph_generic_by_hostname');//api/v0/devices/$hostname/$type
|
||||
$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->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)
|
||||
$app->delete('/devices/:hostname', 'authToken', 'del_device')->name('del_device');//api/v0/devices (json data needs to be passed)
|
||||
$app->get('/bgp', 'authToken', 'list_bgp')->name('list_bgp');//api/v0/bpg
|
||||
$app->group('/portgroups', function() use ($app) {
|
||||
$app->get('/:group', 'authToken', 'get_graph_by_portgroup')->name('get_graph_by_portgroup');//api/v0/portgroups/$group
|
||||
});
|
||||
});
|
||||
$app->get('/v0', 'authToken', 'show_endpoints');//api/v0
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user