Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Web Services:OK Tech Web Services.

Web Services:OK Tech Web Services

From MoodleDocs

Moodle1.9

Moodle 2.0


Purpose

A major announcement of Moodle 2.0 is the Web Service Support allowing the admin to expose particular functions of Moodle for use by Administrative Systems such as HR or SIS applications or Mobile clients. All defined functions are automatically available via :

   * XML-RPC
   * AMF (Flash)
   * REST (any language)
   * SOAP (PHP only) 

This extremely elegant and promising solution will definitively make obsolete previous attempts such as the SOAP based Open Knowledge Technologies Web Services described here. However current [Moodle 2.0 implementation] suffers of two limitations :

  • The current server implementation doesn't work with Java/.Net because we didn't generated a fully describe WSDL yet.
  • The list of supported operations is still limited


This page was started in November 2010 to try to summarize the huge amount of information in this OK Tech Web Services forum and help developers still needing a Soap approach to continue to use this solution and eventually port their existing clients on a Moodle 2.0 server. Contributors are welcome to update this page, and especially help to document all parameters required and returned by operations.

It is obvious that new Web Service based developments should use the official Moodle 2.0 approach, thus helping the community to extend it.

History

The original Soap based Web Service for Moodle 1.7, was announced by Open Knowledge Technologies in March 2007 at the beginning of this discussion. My 'fork' was announced in May 2007. As you can see in the discussion above I took over the answers to most questions since mid 2007.

I kept the name OK Tech WS and to avoid confusion I added some 'pp' (my initials) ; thus I renamed the directory wspp instead of ws and the main entry point became http://yourmoodle/wspp/wsdl_pp.php

In the meantime Open Knowledge Technologies, now named Remote Learner improved internally its version, by merging some of my code, and recently documented it in chapter 14 of the PACKT book "Moodle 1.9 extension development".

Currently, (November 2010), revision 1.7 is available both at cipcnet and in Moodle CVS contrib area. On cipcnet you will find documentations and samples codes in php, Java and python.

Revision 1.7 runs best against a Moodle 1.9.x server, but can be installed on a Moodle 2.0. In that case, returned informations are 'Moodle 1.9 type' only. Moodle 2.0 specific data ( course completion, conditional activities, new File API ...) are not supported.


Others Forks

Installation

Moodle 1.9.X

Moodle 2.0

List of supported operations

All exchanged data types and supported operations are published in a single WSDL file.


Testing the Web Service with SoapUI

Writing a client in PHP

Writing a client in Java

Writing a client in Python

The future