Web Service API Functions - MoodleDocs
Web Service API Functions - MoodleDocs
Note:
If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.
Contents
1 Web service protocols
2 Web service functions
2.1 Naming convention
2.2 Core web service functions
2.3 API Roadmap
3 See also
Web service protocols
Name Moodle Description CORS Issue
Ver.
REST Supported (3.0
(returning 2.0 XML data accessed through a REST API (not restful) and onwards)
XML)
REST Supported (3.0 MDL-29242
(returning 2.2 JSON data accessed through a REST API (not restful) and onwards)
JSON)
REST
(returning 2.X Would be very useful for client-side JavaScript Not supported MDL-29913
JSONP)
JSON 2.X JSON server receives a JSON encoded params and return JSON encoded values. Not supported MDL-21341
SOAP 2.0 Very important for interoperating with Java and .Net applications. There was a partial implementation JAVA/.Net in Moodle 2.0, but it does not work Not supported MDL-20804
MDL-28988
,
,
for anything but the most trivial functions. It is fully working with PHP clients. MDL-28989
XML remote-procedure call.
Note: The installation of the XMLRPC PHP extension is not needed for Moodle 4.1 core anymore. All MNet features continue working exactly
the same, but using a PHP library instead (see MDL-76055 for details).
If you were using the webservice_xmlrpc plugin for integrations with other systems, be warned that it has been removed from core for Moodle
4.1 (see MDL-76052 for details). It's now available @ https://github.com/moodlehq/moodle-webservice_xmlrpc and has been also
published in the Plugins directory . Note that, if you want to continue using this plugin, then you will need, before starting the upgrade
XMLRPC 2.0 process, to: Not supported
1. Install the XMLRPC PHP extension, the webservice requires it.
2. Install the webservice_xmlrpc plugin, from the links in the previous paragraph, into the webservice/xmlrpc directory.
3. Then, and only then, start the upgrade process.
https://docs.moodle.org/dev/Web_service_API_functions 1/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
This naming convention has been in place since Moodle 2.2. See MDL-29106 for more details.
Core web service functions
Area Name Introduced Description Available Login Services
in AJAX required
Return list of users identities
\core_user\search_identity core_user_search_identity 3.11 matching the given criteria in Yes Yes
their name or other identity
fields.
auth_email auth_email_get_signup_settings 3.2 Get the signup required settings Yes No
and profile fields.
auth_email auth_email_signup_user 3.2 Adds a new user (pendingto be Yes No
confirmed) in the site.
block_recentlyaccesseditems block_recentlyaccesseditems_get_recent_items 3.6 List of items a user has Yes Yes moodle_mobile_app
accessed most recently.
block_starredcourses block_starredcourses_get_starred_courses 3.6 Get users starred courses. Yes Yes moodle_mobile_app
Record the action that the user
core\record_userfeedback_action core_create_userfeedback_action_record 3.9 takes in the user feedback Yes Yes
notification for future use.
core_auth core_auth_confirm_user 3.2 Confirm a user account. Yes No
core_auth core_auth_is_age_digital_consent_verification_enabled 3.5 Checks if age digital consent Yes No
verification is enabled.
core_auth core_auth_is_minor 3.5 Requests a check if a user is a Yes No
digital minor.
core_auth core_auth_request_password_reset 3.4 Requests a password reset. Yes No
core_auth core_auth_request_password_reset 3.4 Requests a password reset. Yes No
core_auth core_auth_resend_confirmation_email 3.6 Resend confirmation email. Yes No
core_auth core_auth_resend_confirmation_email 3.6 Resend confirmation email. Yes No
Gets the data to use when
core_backup core_backup_get_async_backup_links_backup 3.7 updating the status table row in Yes Yes
the UI for when an async
backup completes.
Gets the data to use when
core_backup core_backup_get_async_backup_links_restore 3.7 updating the status table row in Yes Yes
the UI for when an async
restore completes.
core_backup core_backup_get_async_backup_progress 3.7 Get the progress of an Yes Yes
Asyncronhous backup.
core_backup core_backup_get_copy_progress 3.9 Gets the progress of course Yes Yes
copy operations.
core_backup core_backup_submit_copy_form 3.9 Handles ajax submission of Yes Yes
course copy form.
core_badges core_badges_get_user_badges 3.1 Returns the list of badges No Yes moodle_mobile_app
awarded to a user.
core_block core_block_get_course_blocks 3.3 Returns blocks information for a No Yes moodle_mobile_app
course.
core_block core_block_get_dashboard_blocks 3.6 Returns blocks information for No Yes moodle_mobile_app
the given user dashboard.
core_block\fetch_addable_blocks core_block_fetch_addable_blocks 3.11 Returns all addable blocks in a Yes Yes moodle_mobile_app
given page.
core_blog core_blog_get_entries 3.6 Returns blog entries. Yes No moodle_mobile_app
core_blog core_blog_view_entries 3.6 Trigger the blog_entries_viewed Yes No moodle_mobile_app
event.
core_calendar core_calendar_create_calendar_events 2.5 Create calendar events No Yes moodle_mobile_app
core_calendar core_calendar_delete_calendar_events 2.5 Delete calendar events Yes Yes moodle_mobile_app
core_calendar core_calendar_get_action_events_by_course 3.3 Get calendar action events by Yes Yes moodle_mobile_app
course
core_calendar core_calendar_get_action_events_by_courses 3.3 Get calendar action events by Yes Yes moodle_mobile_app
courses
core_calendar core_calendar_get_action_events_by_timesort 3.3 Get calendar action events by Yes Yes moodle_mobile_app
tiemsort
core_calendar core_calendar_get_allowed_event_types 3.7 Get the type of events a user No Yes moodle_mobile_app
can create in the given course.
Convenience function to
core_calendar core_calendar_get_calendar_access_information 3.7 retrieve some No Yes moodle_mobile_app
permissions/access information
for the given course calendar.
core_calendar core_calendar_get_calendar_day_view 3.4 Fetch the day view data for a Yes Yes moodle_mobile_app
calendar
core_calendar core_calendar_get_calendar_event_by_id 3.4 Get calendar event by id Yes Yes moodle_mobile_app
core_calendar core_calendar_get_calendar_events 2.5 Get calendar events No Yes moodle_mobile_app
core_calendar core_calendar_get_calendar_monthly_view 3.4 Fetch the monthly view data for Yes Yes moodle_mobile_app
a calendar
core_calendar core_calendar_get_calendar_upcoming_view 3.4 Fetch the upcoming view data Yes Yes moodle_mobile_app
for a calendar
core_calendar core_calendar_get_timestamps 3.8 Fetch unix timestamps for given Yes Yes
date times.
core_calendar core_calendar_submit_create_update_form 3.4 Submit form data for event form Yes Yes moodle_mobile_app
core_calendar core_calendar_update_event_start_day 3.4 Update the start day (but not Yes Yes moodle_mobile_app
time) for an event.
core_calendar\export\token core_calendar_get_calendar_export_token 3.10 Return the auth token required No No moodle_mobile_app
for exporting a calendar.
core_cohort core_cohort_add_cohort_members 2.4 Add members to cohort No Yes
core_cohort core_cohort_create_cohorts 2.4 Create cohorts No Yes
https://docs.moodle.org/dev/Web_service_API_functions 2/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 3/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 6/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 9/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 10/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 11/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 14/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
https://docs.moodle.org/dev/Web_service_API_functions 15/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
This is the list of the integrated core functions. To see the roadmap, see to the tracker issue in the section bellow.
https://docs.moodle.org/dev/Web_service_API_functions 16/17
28/06/2024, 21:33 Web service API functions - MoodleDocs
New Web Services entries are automatically generated for each new major version via this script: https://github.com/moodlehq/moodlemobile-scripts/blob/master/ws-documenter.php
<F2>
API Roadmap
Tracker issue: MDL-29934
SeeWeb services
alsoAPI Changes
How to contribute a web service function to core
Web services developer documentation
Web services user documentation
Retrieved from "https://docs.moodle.org/dev/index.php?title=Web_service_API_functions&oldid=63769"
https://docs.moodle.org/dev/Web_service_API_functions 17/17