2019-12-28 22:58:07 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Routes for the BookStack API.
|
|
|
|
* Routes have a uri prefix of /api/.
|
2020-01-12 22:45:54 +08:00
|
|
|
* Controllers are all within app/Http/Controllers/Api
|
2019-12-28 22:58:07 +08:00
|
|
|
*/
|
|
|
|
|
2020-01-13 00:25:14 +08:00
|
|
|
Route::get('docs', 'ApiDocsController@display');
|
|
|
|
Route::get('docs.json', 'ApiDocsController@json');
|
|
|
|
|
2020-01-18 22:03:11 +08:00
|
|
|
Route::get('books', 'BooksApiController@list');
|
2020-01-12 22:45:54 +08:00
|
|
|
Route::post('books', 'BooksApiController@create');
|
|
|
|
Route::get('books/{id}', 'BooksApiController@read');
|
|
|
|
Route::put('books/{id}', 'BooksApiController@update');
|
|
|
|
Route::delete('books/{id}', 'BooksApiController@delete');
|
2020-02-23 13:41:49 +08:00
|
|
|
|
2020-04-10 23:05:17 +08:00
|
|
|
Route::get('books/{id}/export/html', 'BooksExportApiController@exportHtml');
|
|
|
|
Route::get('books/{id}/export/pdf', 'BooksExportApiController@exportPdf');
|
|
|
|
Route::get('books/{id}/export/plaintext', 'BooksExportApiController@exportPlainText');
|
|
|
|
|
2020-02-23 13:41:49 +08:00
|
|
|
Route::get('shelves', 'BookshelfApiController@list');
|
|
|
|
Route::post('shelves', 'BookshelfApiController@create');
|
|
|
|
Route::get('shelves/{id}', 'BookshelfApiController@read');
|
|
|
|
Route::put('shelves/{id}', 'BookshelfApiController@update');
|
|
|
|
Route::delete('shelves/{id}', 'BookshelfApiController@delete');
|