Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Web services: Difference between revisions

From MoodleDocs
No edit summary
(14 intermediate revisions by 2 users not shown)
Line 15: Line 15:
The full API can be found on any Moodle sites under ''' Administration block > Plugins > Web services > API Documentation'''.
The full API can be found on any Moodle sites under ''' Administration block > Plugins > Web services > API Documentation'''.


* [[Creating a web service and a web service function | Implement a web service and a web service function]]
* [[How to contribute a web service function to core]]
* [[Adding a web service to a plugin| Adding a web service to your plugin]]
* [[Creating a web service client | Implement a web service client]]
* [[Creating a web service client | Implement a web service client]]
* [[Web_services_Roadmap | Web service Roadmap]]
* [[Web services files handling]]
* [[Web_services_Roadmap | Web service Listing & Roadmap]]


== Other documentation ==
== Specification and brainstorming ==
* [[External services security | External services security]]
* [[External services description | External services description]]
 
== See also ==
* [[Web_service_API_functions|Web service API functions]]
* [[:en:Web_services_FAQ|Web services FAQ]]
* [[:en:How_to_create_and_enable_a_web_service|How to create and enable a web service]]
* [[:en:How_to_create_and_enable_a_web_service|How to create and enable a web service]]
* [[:en:Enable mobile web services|How to enable the mobile web service]]
* [[:en:Enable mobile web services|How to enable the mobile web service]]
* [[:en:Web_services|Web services]]
* [[:en:Web_services|Web services user documentation]]
* [http://www.slideshare.net/juanleyva/mastering-moodle-web-services-development Mastering Moodle Web Services development] - Last session of the Hackfest in the MoodleMoot UK 2016


[[Category:Interfaces]]
[[Category:Web_Services]]

Revision as of 14:53, 4 April 2016

How it works

This simple example will give you an idea of how our web services infrastructure works.

  1. The client sends a username and password to the web service login script.
  2. The script returns a token for that user account.
  3. The client calls a particular web service function on a protocol server including the token .
  4. The protocol server uses the token to check that the user can call the function.
  5. The protocol server call the matching external function, located in a externallib.php file inside the relevant module.
  6. The external function checks that the current user has_capability to do this operation.
  7. The external function calls the matching Moodle core function (in lib.php usually).
  8. The core function can return a result to the external function.
  9. The external function will return a result to the protocol server.
  10. The protocol server returns the result to the client.

Developer documentation

The full API can be found on any Moodle sites under Administration block > Plugins > Web services > API Documentation.

Specification and brainstorming

See also