mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
More updates to api
This commit is contained in:
21
html/api.php
21
html/api.php
@@ -28,14 +28,21 @@ require_once("../includes/api_functions.inc.php");
|
||||
$app->setName('api');
|
||||
|
||||
$app->group('/get', function() use ($app) {
|
||||
$app->group('/port', function() use ($app) {
|
||||
$app->group('/graph', function() use ($app) {
|
||||
$app->get('/id/:id(/:type)(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_by_id');//api.php/get/port/graph/id/$port_id/$key
|
||||
$app->get('/device/:id/:port(/:type)(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_by_port');//api.php/get/port/graph/device/$device_id/$ifName/$key
|
||||
$app->group('/graph', function() use ($app) {
|
||||
$app->group('/port', function() use ($app) {
|
||||
$app->get('/id/:id(/:type)(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_by_id');//api.php/get/graph/port/id/$port_id/$key
|
||||
$app->get('/device/:id/:port(/:type)(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_by_port');//api.php/get/graph/port/device/$device_id/$ifName/$key
|
||||
$app->get('/hostname/:hostname/:port(/:type)(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_by_port_hostname');//api.php/get/graph/port/device/$hostname/$ifName/$key
|
||||
});
|
||||
$app->group('/stats', function() use ($app) {
|
||||
$app->get('/id/:id/:key(/)', 'authToken', 'get_port_stats_by_id');//api.php/get/port/stats/id/$port_id/$key
|
||||
$app->get('/device/:id/:port/:key(/)', 'authToken', 'get_port_stats_by_port');//api.php/get/port/stats/device/$device_id/$ifName/$key
|
||||
$app->group('/general', function() use ($app) {
|
||||
$app->get('/device/:id/:type(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_generic_by_deviceid');//api.php/get/graph/general/device/$device_id/$graph_type/$key
|
||||
$app->get('/hostname/:hostname/:type(/:width)(/:height)(/:from)(/:to)/:key(/)', 'authToken', 'get_graph_generic_by_hostname');//api.php/get/graph/general/hostname/$hostname/$graph_type/$key
|
||||
});
|
||||
});
|
||||
$app->group('/stats', function() use ($app) {
|
||||
$app->group('/port', function() use ($app) {
|
||||
$app->get('/id/:id/:key(/)', 'authToken', 'get_port_stats_by_id');//api.php/get/stats/port/id/$port_id/$key
|
||||
$app->get('/device/:id/:port/:key(/)', 'authToken', 'get_port_stats_by_port');//api.php/get/stats/port/device/$device_id/$ifName/$key
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user