Note: You are currently viewing documentation for Moodle 2.1. Up-to-date documentation for the latest stable version is available here: Web services.

Development:Web services: Difference between revisions

From MoodleDocs
Line 3: Line 3:
=Introduction=
=Introduction=
This page described the Web Services module implemented for Moodle 2.0<br>
This page described the Web Services module implemented for Moodle 2.0<br>
The tracker issue is here: MDL-12886
The tracker issue is here: MDL-12886<br>
Web Site of the Web Service Team: [http://blogs.dfwikilabs.org/moodle_ws/ Moodle Web Service Team]


=Implementation=
=Implementation=

Revision as of 03:19, 6 November 2008

Note: This article is a work in progress. Please use the page comments or an appropriate moodle.org forum for any recommendations/suggestions for improvement.

Template:Moodle 2.0

Introduction

This page described the Web Services module implemented for Moodle 2.0
The tracker issue is here: MDL-12886
Web Site of the Web Service Team: Moodle Web Service Team

Implementation

Web Services module has been conceived in a purpose to be ported on different Moodle version, and also on different project. It has also for purpose to support multiple web service protocols (REST, SOAP, AMFPHP, ...). Adding a new protocol support should be relatively easy.

How does it work

The web service client call a Moodle web service. The web service is located in a folder specific to the used protocol. It's usually a inout.php file. This file runs the web service server and gets the sent parameters. Then it calls a wrapper. The wrapper.php file is implemented in order to call the Moodle API which contains all callable functions. The wrapper will check a "generated file" in order to know which functions are available, and what their parameters and what they returned.
For any protocol there should be at least one inout.php file and one wrapper file.

Security

How does the web services are secured ?
Security layer implemented by every protocol?

List of functions

All callable functions are declared into Moodle API, please read Moodle API documentation.