2014-11-24 18:01:11 +00:00
|
|
|
<?php
|
|
|
|
|
2014-11-24 20:45:04 +00:00
|
|
|
Route::api(['version' => 'v1', 'prefix' => 'api'], function() {
|
2014-11-24 18:01:11 +00:00
|
|
|
|
2014-11-24 20:45:04 +00:00
|
|
|
Route::get('components', 'ApiController@getComponents');
|
|
|
|
Route::get('components/{id}', 'ApiController@getComponent');
|
2014-11-25 09:40:54 +00:00
|
|
|
Route::get('components/{id}/incidents', 'ApiController@getComponentIncidents');
|
2014-11-25 10:30:42 +00:00
|
|
|
Route::get('incidents', 'ApiController@getIncidents');
|
|
|
|
Route::get('incidents/{id}', 'ApiController@getIncident');
|
2014-11-25 20:31:07 +00:00
|
|
|
Route::get('metrics', 'ApiController@getMetrics');
|
|
|
|
Route::get('metrics/{id}', 'ApiController@getMetric');
|
2014-11-24 18:01:11 +00:00
|
|
|
|
2014-11-25 11:06:28 +00:00
|
|
|
Route::group(['protected' => true], function() {
|
|
|
|
Route::post('components', 'ApiController@postComponents');
|
|
|
|
Route::post('incidents', 'ApiController@postIncidents');
|
2014-11-25 12:40:12 +00:00
|
|
|
|
|
|
|
Route::put('incidents/{id}', 'ApiController@putIncident');
|
2014-11-25 11:06:28 +00:00
|
|
|
});
|
|
|
|
|
2014-11-24 20:45:04 +00:00
|
|
|
});
|