2016-09-05 22:21:36 +02:00
|
|
|
<?php
|
2017-11-19 23:30:00 +01:00
|
|
|
|
2017-10-08 01:08:43 +02:00
|
|
|
/*
|
2017-11-19 23:30:00 +01:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| User Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2018-01-20 02:58:57 +01:00
|
|
|
| Endpoint: /api/application/users
|
2017-11-19 23:30:00 +01:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => '/users'], function () {
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::get('/', 'Users\UserController@index')->name('api.application.users');
|
2018-02-04 22:38:38 +01:00
|
|
|
Route::get('/{user}', 'Users\UserController@view')->name('api.application.users.view');
|
2018-02-08 04:56:11 +01:00
|
|
|
Route::get('/external/{external_id}', 'Users\ExternalUserController@index')->name('api.application.users.external');
|
2017-11-19 23:30:00 +01:00
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::post('/', 'Users\UserController@store');
|
|
|
|
Route::patch('/{user}', 'Users\UserController@update');
|
2017-11-19 23:30:00 +01:00
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::delete('/{user}', 'Users\UserController@delete');
|
2017-11-19 23:30:00 +01:00
|
|
|
});
|
2017-12-17 21:57:05 +01:00
|
|
|
|
2018-01-01 22:11:44 +01:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Node Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2018-01-20 02:58:57 +01:00
|
|
|
| Endpoint: /api/application/nodes
|
2018-01-01 22:11:44 +01:00
|
|
|
|
|
|
|
|
*/
|
2017-12-17 21:57:05 +01:00
|
|
|
Route::group(['prefix' => '/nodes'], function () {
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::get('/', 'Nodes\NodeController@index')->name('api.application.nodes');
|
|
|
|
Route::get('/{node}', 'Nodes\NodeController@view')->name('api.application.nodes.view');
|
2018-01-01 22:11:44 +01:00
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::post('/', 'Nodes\NodeController@store');
|
|
|
|
Route::patch('/{node}', 'Nodes\NodeController@update');
|
2018-01-01 22:11:44 +01:00
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::delete('/{node}', 'Nodes\NodeController@delete');
|
2018-01-11 06:19:03 +01:00
|
|
|
|
|
|
|
Route::group(['prefix' => '/{node}/allocations'], function () {
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::get('/', 'Nodes\AllocationController@index')->name('api.application.allocations');
|
2018-01-11 06:19:03 +01:00
|
|
|
|
2018-01-27 19:38:56 +01:00
|
|
|
Route::post('/', 'Nodes\AllocationController@store');
|
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::delete('/{allocation}', 'Nodes\AllocationController@delete')->name('api.application.allocations.view');
|
2018-01-11 06:19:03 +01:00
|
|
|
});
|
2017-12-17 21:57:05 +01:00
|
|
|
});
|
2018-01-04 04:14:53 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Location Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2018-01-20 02:58:57 +01:00
|
|
|
| Endpoint: /api/application/locations
|
2018-01-04 04:14:53 +01:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => '/locations'], function () {
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::get('/', 'Locations\LocationController@index')->name('api.applications.locations');
|
|
|
|
Route::get('/{location}', 'Locations\LocationController@view')->name('api.application.locations.view');
|
2018-01-04 04:14:53 +01:00
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::post('/', 'Locations\LocationController@store');
|
|
|
|
Route::patch('/{location}', 'Locations\LocationController@update');
|
2018-01-04 04:14:53 +01:00
|
|
|
|
2018-01-20 04:47:06 +01:00
|
|
|
Route::delete('/{location}', 'Locations\LocationController@delete');
|
|
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
2018-01-20 04:48:26 +01:00
|
|
|
| Server Controller Routes
|
2018-01-20 04:47:06 +01:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /api/application/servers
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => '/servers'], function () {
|
|
|
|
Route::get('/', 'Servers\ServerController@index')->name('api.application.servers');
|
2018-01-20 20:48:02 +01:00
|
|
|
Route::get('/{server}', 'Servers\ServerController@view')->name('api.application.servers.view');
|
2018-02-24 21:09:09 +01:00
|
|
|
Route::get('/external/{external_id}', 'Servers\ExternalServerController@index')->name('api.application.servers.external');
|
2018-01-20 20:48:02 +01:00
|
|
|
|
2018-01-20 23:03:23 +01:00
|
|
|
Route::patch('/{server}/details', 'Servers\ServerDetailsController@details')->name('api.application.servers.details');
|
2018-01-21 23:02:03 +01:00
|
|
|
Route::patch('/{server}/build', 'Servers\ServerDetailsController@build')->name('api.application.servers.build');
|
2018-01-31 03:36:59 +01:00
|
|
|
Route::patch('/{server}/startup', 'Servers\StartupController@index')->name('api.application.servers.startup');
|
2018-01-20 23:03:23 +01:00
|
|
|
|
2018-01-29 00:14:14 +01:00
|
|
|
Route::post('/', 'Servers\ServerController@store');
|
2018-01-20 20:48:02 +01:00
|
|
|
Route::post('/{server}/suspend', 'Servers\ServerManagementController@suspend')->name('api.application.servers.suspend');
|
|
|
|
Route::post('/{server}/unsuspend', 'Servers\ServerManagementController@unsuspend')->name('api.application.servers.unsuspend');
|
|
|
|
Route::post('/{server}/reinstall', 'Servers\ServerManagementController@reinstall')->name('api.application.servers.reinstall');
|
|
|
|
|
|
|
|
Route::delete('/{server}', 'Servers\ServerController@delete');
|
|
|
|
Route::delete('/{server}/{force?}', 'Servers\ServerController@delete');
|
2018-01-26 04:26:06 +01:00
|
|
|
|
|
|
|
// Database Management Endpoint
|
|
|
|
Route::group(['prefix' => '/{server}/databases'], function () {
|
|
|
|
Route::get('/', 'Servers\DatabaseController@index')->name('api.application.servers.databases');
|
|
|
|
Route::get('/{database}', 'Servers\DatabaseController@view')->name('api.application.servers.databases.view');
|
|
|
|
|
|
|
|
Route::post('/', 'Servers\DatabaseController@store');
|
2018-01-26 05:34:53 +01:00
|
|
|
Route::post('/{database}/reset-password', 'Servers\DatabaseController@resetPassword');
|
2018-01-26 04:26:06 +01:00
|
|
|
|
|
|
|
Route::delete('/{database}', 'Servers\DatabaseController@delete');
|
|
|
|
});
|
2018-01-04 04:14:53 +01:00
|
|
|
});
|
2018-01-27 19:38:56 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Nest Controller Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /api/application/nests
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => '/nests'], function () {
|
|
|
|
Route::get('/', 'Nests\NestController@index')->name('api.application.nests');
|
|
|
|
Route::get('/{nest}', 'Nests\NestController@view')->name('api.application.nests.view');
|
|
|
|
|
|
|
|
// Egg Management Endpoint
|
|
|
|
Route::group(['prefix' => '/{nest}/eggs'], function () {
|
|
|
|
Route::get('/', 'Nests\EggController@index')->name('api.application.nests.eggs');
|
|
|
|
Route::get('/{egg}', 'Nests\EggController@view')->name('api.application.nests.eggs.view');
|
|
|
|
});
|
|
|
|
});
|