Web Services
All through this book, we have been dealing with internal interfaces, such as the Page API or the Access API. We end the book by considering external interfaces. Integrating applications into a larger product landscape is often how large-scale implementations fail (that is, the failure of one system to properly talk to another). The solution that allows web applications to talk to each other is called a Web Service; for more details, visit https://en.wikipedia.org/wiki/Web_service.
In this section, we will be investigating methods to export data out of Moodle using the Web Services API. For details on Moodle's Web Services support, refer to the Moodle documentation at https://docs.moodle.org/dev/Web_services. Moodle's Web Services API is disabled by default; so, you will need to follow the instructions at https://docs.moodle.org/31/en/Using_web_services#Enabling_web_services to enable it. By default, Moodle supports the REST, SOAP, and XML-RPC protocols, and there are advantages...