2014-11-24 18:01:11 +00:00
|
|
|
<?php
|
|
|
|
|
2014-12-05 16:04:41 +00:00
|
|
|
Route::api(['version' => 'v1', 'namespace' => 'CachetHQ\Cachet\Controllers\Api'], function() {
|
2014-11-24 18:01:11 +00:00
|
|
|
|
2014-11-27 16:05:00 +00:00
|
|
|
Route::get('components', 'ComponentController@getComponents');
|
|
|
|
Route::get('components/{id}', 'ComponentController@getComponent');
|
|
|
|
Route::get('components/{id}/incidents', 'ComponentController@getComponentIncidents');
|
|
|
|
Route::get('incidents', 'IncidentController@getIncidents');
|
|
|
|
Route::get('incidents/{id}', 'IncidentController@getIncident');
|
|
|
|
Route::get('metrics', 'MetricController@getMetrics');
|
|
|
|
Route::get('metrics/{id}', 'MetricController@getMetric');
|
2014-11-24 18:01:11 +00:00
|
|
|
|
2014-11-27 16:05:00 +00:00
|
|
|
Route::group(['protected' => true], function() {
|
|
|
|
Route::post('components', 'ComponentController@postComponents');
|
|
|
|
Route::post('incidents', 'IncidentController@postIncidents');
|
|
|
|
Route::post('metrics', 'MetricController@postMetrics');
|
2014-11-25 12:40:12 +00:00
|
|
|
|
2014-11-27 16:05:00 +00:00
|
|
|
Route::put('components/{id}', 'ComponentController@putComponent');
|
|
|
|
Route::put('incidents/{id}', 'IncidentController@putIncident');
|
|
|
|
Route::put('metrics/{id}', 'MetricController@putMetric');
|
|
|
|
});
|
2014-11-25 11:06:28 +00:00
|
|
|
|
2014-11-27 22:08:28 +00:00
|
|
|
});
|