If you have experimented with the Moodle Web Services then you will find there are pockets of information that can be pieced together to help understand how the API’s work.
Below is a list of links to pages and sites that I have found extremely useful when it comes to putting together an external web service.
Moodle web service links
The first most important page is on your Moodle server.
This will list all the web service functions that you have available and describe the schema for each service in different protocols.
Current web service functions from the Moodle documentation.
Using web services – setting up the service on Moodle
Creating a web service client
Getting started list of steps to setup web services in Moodle
Step by step setup
Quick Web service setup and test
Example: Save grades using PHP.
Download CURL if you are using PHP as your server side code from here.
Some code to get you started
If you just want some code to get you started, the below code is the core of what you will need.
Make sure you setup your Moodle service as recommended in the above links to allow web services and setup a user account with a token.
Enrol the user with the web service token into the course you are going to test with.
Remember that your account must have permission to use a web service.
I am assuming you are using PHP as the external application server to call the Moodle web services?
On a PHP server, download the CURL PHP file from above and add it to your web server to be included by the code below.
Create a PHP testwebservice.php page and add the following code.
Replace courseid_as_integer with your test course ID.
This will return the details about the course ID that you set as JSON data.
Need more information….. Join the NEW Moodle Administrators and Developers group