The current situation:
- I created a local plugin. This plugin is a simple form that inserts records to a custom table. It extends the moodleform class (let's call it MYFORM).
- I created other plugin, a webservice that extends the external_api class (let's call it MYWEBSERVICE). I am stating this just to be clear on what I have done previously.
Both plugins are working fine.
In MYFORM plugin I need to expose the data of my new tables as a REST webservice, independently. So I can't use MYWEBSERVICE to expose this data in particular.
Since MYFORM plugin is based on moodleform class, exist some way I could expose the data without creating another webservice plugin?
"Exposing functions as Web service functions is done in one file called services.php".
I wasn't aware that I could use the services.php in non external_api plugins.