2019-12-28 22:58:07 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Routes for the BookStack API.
|
|
|
|
* Routes have a uri prefix of /api/.
|
2021-06-26 23:23:15 +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.json', 'ApiDocsController@json');
|
|
|
|
|
2021-10-19 00:46:55 +08:00
|
|
|
Route::get('attachments', 'AttachmentApiController@list');
|
|
|
|
Route::post('attachments', 'AttachmentApiController@create');
|
|
|
|
Route::get('attachments/{id}', 'AttachmentApiController@read');
|
|
|
|
Route::put('attachments/{id}', 'AttachmentApiController@update');
|
|
|
|
Route::delete('attachments/{id}', 'AttachmentApiController@delete');
|
|
|
|
|
2020-05-23 07:28:41 +08:00
|
|
|
Route::get('books', 'BookApiController@list');
|
|
|
|
Route::post('books', 'BookApiController@create');
|
|
|
|
Route::get('books/{id}', 'BookApiController@read');
|
|
|
|
Route::put('books/{id}', 'BookApiController@update');
|
|
|
|
Route::delete('books/{id}', 'BookApiController@delete');
|
2020-02-23 13:41:49 +08:00
|
|
|
|
2020-05-23 07:28:41 +08:00
|
|
|
Route::get('books/{id}/export/html', 'BookExportApiController@exportHtml');
|
|
|
|
Route::get('books/{id}/export/pdf', 'BookExportApiController@exportPdf');
|
|
|
|
Route::get('books/{id}/export/plaintext', 'BookExportApiController@exportPlainText');
|
2021-06-23 04:32:55 +08:00
|
|
|
Route::get('books/{id}/export/markdown', 'BookExportApiController@exportMarkdown');
|
2020-05-23 07:28:41 +08:00
|
|
|
|
|
|
|
Route::get('chapters', 'ChapterApiController@list');
|
|
|
|
Route::post('chapters', 'ChapterApiController@create');
|
|
|
|
Route::get('chapters/{id}', 'ChapterApiController@read');
|
|
|
|
Route::put('chapters/{id}', 'ChapterApiController@update');
|
|
|
|
Route::delete('chapters/{id}', 'ChapterApiController@delete');
|
|
|
|
|
|
|
|
Route::get('chapters/{id}/export/html', 'ChapterExportApiController@exportHtml');
|
|
|
|
Route::get('chapters/{id}/export/pdf', 'ChapterExportApiController@exportPdf');
|
|
|
|
Route::get('chapters/{id}/export/plaintext', 'ChapterExportApiController@exportPlainText');
|
2021-06-23 04:32:55 +08:00
|
|
|
Route::get('chapters/{id}/export/markdown', 'ChapterExportApiController@exportMarkdown');
|
2020-04-10 23:05:17 +08:00
|
|
|
|
2020-11-22 22:56:19 +08:00
|
|
|
Route::get('pages', 'PageApiController@list');
|
|
|
|
Route::post('pages', 'PageApiController@create');
|
|
|
|
Route::get('pages/{id}', 'PageApiController@read');
|
|
|
|
Route::put('pages/{id}', 'PageApiController@update');
|
|
|
|
Route::delete('pages/{id}', 'PageApiController@delete');
|
2020-11-28 23:39:40 +08:00
|
|
|
|
|
|
|
Route::get('pages/{id}/export/html', 'PageExportApiController@exportHtml');
|
|
|
|
Route::get('pages/{id}/export/pdf', 'PageExportApiController@exportPdf');
|
|
|
|
Route::get('pages/{id}/export/plaintext', 'PageExportApiController@exportPlainText');
|
2021-06-23 04:32:55 +08:00
|
|
|
Route::get('pages/{id}/export/markdown', 'PageExportApiController@exportMarkDown');
|
2020-11-28 23:39:40 +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');
|