forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-admin.php
More file actions
97 lines (83 loc) · 2.85 KB
/
api-admin.php
File metadata and controls
97 lines (83 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
Route::get('/', 'CoreController@index');
/*
|--------------------------------------------------------------------------
| Server Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /api/admin/servers
|
*/
Route::group(['prefix' => '/servers'], function () {
Route::get('/', 'ServerController@index');
Route::get('/{id}', 'ServerController@view');
Route::post('/', 'ServerController@store');
Route::put('/{id}/details', 'ServerController@details');
Route::put('/{id}/container', 'ServerController@container');
Route::put('/{id}/build', 'ServerController@build');
Route::put('/{id}/startup', 'ServerController@startup');
Route::patch('/{id}/install', 'ServerController@install');
Route::patch('/{id}/rebuild', 'ServerController@rebuild');
Route::patch('/{id}/suspend', 'ServerController@suspend');
Route::delete('/{id}', 'ServerController@delete');
});
/*
|--------------------------------------------------------------------------
| Location Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /api/admin/locations
|
*/
Route::group(['prefix' => '/locations'], function () {
Route::get('/', 'LocationController@index');
});
/*
|--------------------------------------------------------------------------
| Node Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /api/admin/nodes
|
*/
Route::group(['prefix' => '/nodes'], function () {
Route::get('/', 'NodeController@index');
Route::get('/{id}', 'NodeController@view');
Route::get('/{id}/config', 'NodeController@viewConfig');
Route::post('/', 'NodeController@store');
Route::delete('/{id}', 'NodeController@delete');
});
/*
|--------------------------------------------------------------------------
| User Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /api/admin/users
|
*/
Route::group(['prefix' => '/users'], function () {
Route::get('/', 'UserController@index');
Route::get('/{id}', 'UserController@view');
Route::post('/', 'UserController@store');
Route::put('/{id}', 'UserController@update');
Route::delete('/{id}', 'UserController@delete');
});
/*
|--------------------------------------------------------------------------
| Service Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /api/admin/services
|
*/
Route::group(['prefix' => '/services'], function () {
Route::get('/', 'ServiceController@index');
Route::get('/{id}', 'ServiceController@view');
});