Reputation: 63
so i want to build mobile app with flutter like moodleApp, so that app just fetch api from the existing moodle web, then, does moodle provid API to be used freely? or any other way?
Upvotes: 5
Views: 17606
Reputation: 1121
To enable Moodle as an API (here it calls Web-Services
) and create endpoint to make external HTTP-requests you need to follow these steps:
/admin/settings.php?section=optionalsubsystems#admin-enablewebservices
/admin/settings.php?section=webserviceprotocols
/admin/webservice/service.php?id=0
/admin/webservice/tokens.php?action=create
/admin/settings.php?section=externalservices
add an external function to your WS (click Functions
next to your WS). Here you can add core external functions, also it is possible to create an own ones with your plugin.Moodle API/Web-Service
is a big issue with a lot of things, to control and easy manage it from one place there is a local plugin WSManager.
Upvotes: 1
Reputation: 414
Yes. Moodle provide API
https://docs.moodle.org/dev/Core_APIs
https://docs.moodle.org/dev/Web_service_API_functions
https://docs.moodle.org/dev/Creating_a_web_service_client
Example : https://example.com/moodle/webservice/rest/server.php?wstoken=...&wsfunction=...&moodlewsrestformat=json
Upvotes: 9