You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add the book and chapter title in the response of the /api/search endpoint? Right now, the response only shows the book_id and chapter_id if the type value is a page.
As a workaround, I loop through the response of /api/search and hit the /api/books/{id} endpoint every time to get the book title. The same for chapters also. I need to hit the /api/chapters/{id} endpoint to get the chapter title.
Use-Case
I use the api/search endpoint for an external site to access a KB (knowledge Base) that is using BookStack. Both the external site and my instance of BookStack are not publicly available. As I mentioned earlier, as a workaround I need to loop trough the response of the /api/search endpoint to fetch the book and chapter titles from the API so that the external site can consume my custom endpoint with all the necessary data. It is slow and very tedious, so the inclusion of the book and chapter titles in the search response would be great.
Additional context
I don't know if the inclusion of the book and chapter title would be a performance hit, but I assume it could be an optional parameter (or flag) set in the /api/search endpoint. Lets say a query parameter that would indicate to include the title of the book and chapter in the response.
The text was updated successfully, but these errors were encountered:
Thanks to @rashadkhan359 for starting it off in #5280, this has now been added and will be part of the next feature release.
Thanks @adimesic for the original request.
API Endpoint or Feature
Is it possible to add the book and chapter title in the response of the /api/search endpoint? Right now, the response only shows the book_id and chapter_id if the type value is a page.
As a workaround, I loop through the response of /api/search and hit the /api/books/{id} endpoint every time to get the book title. The same for chapters also. I need to hit the /api/chapters/{id} endpoint to get the chapter title.
Use-Case
I use the api/search endpoint for an external site to access a KB (knowledge Base) that is using BookStack. Both the external site and my instance of BookStack are not publicly available. As I mentioned earlier, as a workaround I need to loop trough the response of the /api/search endpoint to fetch the book and chapter titles from the API so that the external site can consume my custom endpoint with all the necessary data. It is slow and very tedious, so the inclusion of the book and chapter titles in the search response would be great.
Additional context
I don't know if the inclusion of the book and chapter title would be a performance hit, but I assume it could be an optional parameter (or flag) set in the /api/search endpoint. Lets say a query parameter that would indicate to include the title of the book and chapter in the response.
The text was updated successfully, but these errors were encountered: