API Calls to list Device Outages, calculated Availability (#12103)

* API Calls to list Device Outages, calculated Availability

* switch to eloquent

* style correction
This commit is contained in:
SourceDoctor
2020-09-24 00:21:08 +02:00
committed by GitHub
parent f3f67e834f
commit 9ade71d20c
3 changed files with 140 additions and 0 deletions

View File

@@ -87,6 +87,8 @@ Route::group(['prefix' => 'v0', 'namespace' => '\App\Api\Controllers'], function
Route::group(['prefix' => 'devices'], function () {
Route::get('{hostname}', 'LegacyApiController@get_device')->name('get_device');
Route::get('{hostname}/discover', 'LegacyApiController@trigger_device_discovery')->name('trigger_device_discovery');
Route::get('{hostname}/availability', 'LegacyApiController@device_availability')->name('device_availability');
Route::get('{hostname}/outages', 'LegacyApiController@device_outages')->name('device_outages');
Route::get('{hostname}/graphs/health/{type}/{sensor_id?}', 'LegacyApiController@get_graph_generic_by_hostname')->name('get_health_graph');
Route::get('{hostname}/graphs/wireless/{type}/{sensor_id?}', 'LegacyApiController@get_graph_generic_by_hostname')->name('get_wireless_graph');
Route::get('{hostname}/vlans', 'LegacyApiController@get_vlans')->name('get_vlans');