How to fetch content of Book created in Moodle using APIs?

147 views Asked by At

How to fetch content of Book created in Moodle using APIs?

I have tested mod_book_view_book function, but I am only getting book name, not the content of book.

1

There are 1 answers

0
Денис Андреевич On

Use core_course_get_contents function, then take from response elements, where modname="book"

Example:

https://host/webservice/rest/server.php?wstoken=user_token&wsfunction=core_course_get_contents&moodlewsrestformat=json&courseid=31