This is a simple script to import multiple markdown files from a single directory to BookStack's book.
You can get your API Token and ID from the user's setting.
In order to get your
BOOK_ID, use the following command
curl --request GET \ --url https://<YOUR_BOOKSTACK_DOMAIN>/api/books \ --header 'Authorization: Token <YOUR_ID_AND_TOKEN_HERE>'
curl --request GET \ --url https://bookstack.example.com/api/books \ --header 'Authorization: Token MY_TOKEN_ID:MY_TOKEN_SECRET'
You'll get a json which will have book id as an integer.
Add the path of directory you'd like to import markdown files from.