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
m (Protected "Web services": Developer Docs Migration ([Edit=Allow only administrators] (indefinite)))
 
(26 intermediate revisions by 9 users not shown)
Line 1: Line 1:
=== How it works ===
{{Template:Migrated|newDocId=/docs/apis/subsystems/external/}}
This simple example will give you an idea of how our web services infrastructure works.
#The client sends a username and password to the web service login script.
#The script returns a token for that user account.
#The client calls a particular web service function on a protocol server including the token .
#The protocol server uses the token to check that the user can call the function.
#The protocol server call the matching external function, located in a externallib.php file inside the relevant module.
#The external function checks that the current user has_capability to do this operation.
#The external function calls the matching Moodle core function (in lib.php usually).
#The core function can return a result to the external function.
#The external function will return a result to the protocol server.
#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'''.
 
* [[Creating a web service and a web service function | Implement a web service and a web service function]]
* [[Creating a web service client | Implement a web service client]]
* [[Web_services_Roadmap | Web service Roadmap]]
 
== Other documentation ==
* [[How_to_create_and_enable_a_web_service|How to create and enable a web service]]
* [[Enable mobile web services|How to enable the mobile web service]]
 
[[Category:Interfaces]]

Latest revision as of 06:13, 22 December 2022

Important:

This content of this page has been updated and migrated to the new Moodle Developer Resources. The information contained on the page should no longer be seen up-to-date.

Why not view this page on the new site and help us to migrate more content to the new site!