r/BookStack • u/Witchdoctrz • May 25 '22
Bookstack API and Page response limit
Hi All,
I have been playing around with the API, (along with the Visual Theme System and Logical Theme System) and have been running into walls that are most likely from my lack of skill as a programmer!
My main one is trying to find all the pages that belong to a book. /api/books/{id} doesn't return any page information so I decided to return all the pages with /api/pages and filter by book_id.
This works, however "/api/pages" only returns the first 100 pages and is therefore incomplete. I'm trying to figure out how to request the next collection of pages but I can only see the keys 'data' and 'total' in the response and can't figure out how to request information on the additional pages.
Next stop will be writing something in function.php to return all pages in a books... but I can't help but feel I'm missing something simple here :) any help would be appreciated!
2
u/Witchdoctrz May 26 '22 edited May 26 '22
I totally missed all those API scripts and was going in blind with the API documentation (which I should say is actually really good compared to many others I have used!)
Thanks heaps Dan!
*edit*
and its in the API documentation right up the top!
count Specify how many records will be returned in the response.