Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Class: external  - X-Ref

This is the external API for this tool.

get_plugins_supporting_mobile_parameters()   X-Ref
Returns description of get_plugins_supporting_mobile() parameters.

return: external_function_parameters

get_plugins_supporting_mobile()   X-Ref
Returns a list of Moodle plugins supporting the mobile app.

return: array an array of warnings and objects containing the plugin information

get_plugins_supporting_mobile_returns()   X-Ref
Returns description of get_plugins_supporting_mobile() result value.

return: \core_external\external_description

get_public_config_parameters()   X-Ref
Returns description of get_public_config() parameters.

return: external_function_parameters

get_public_config()   X-Ref
Returns a list of the site public settings, those not requiring authentication.

return: array with the settings and warnings

get_public_config_returns()   X-Ref
Returns description of get_public_config() result value.

return: \core_external\external_description

get_config_parameters()   X-Ref
Returns description of get_config() parameters.

return: external_function_parameters

get_config($section = '')   X-Ref
Returns a list of site settings, filtering by section.

param: string $section settings section name
return: array with the settings and warnings

get_config_returns()   X-Ref
Returns description of get_config() result value.

return: \core_external\external_description

get_autologin_key_parameters()   X-Ref
Returns description of get_autologin_key() parameters.

return: external_function_parameters

get_autologin_key($privatetoken)   X-Ref
Creates an auto-login key for the current user. Is created only in https sites and is restricted by time and ip address.

Please note that it only works if the request comes from the Moodle mobile or desktop app.

param: string $privatetoken the user private token for validating the request
return: array with the settings and warnings

get_autologin_key_returns()   X-Ref
Returns description of get_autologin_key() result value.

return: \core_external\external_description

get_content_parameters()   X-Ref
Returns description of get_content() parameters

return: external_function_parameters

Class: is  - X-Ref

get_content($component, $method, $args = array()   X-Ref
Returns a piece of content to be displayed in the Mobile app, it usually returns a template, javascript and
other structured data that will be used to render a view in the Mobile app.

Callbacks (placed in \$component\output\mobile) that are called by this web service are responsible for doing the
appropriate security checks to access the information to be returned.

param: string $component name of the component.
param: string $method function method name in class \$component\output\mobile.
param: array $args optional arguments for the method.
return: array HTML, JavaScript and other required data and information to create a view in the app.

get_content_returns()   X-Ref
Returns description of get_content() result value

return: array

call_external_functions_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

call_external_functions($requests)   X-Ref
Call multiple external functions and return all responses.

param: array $requests List of requests.
return: array Responses.

call_external_functions_returns()   X-Ref
Returns description of method result value

return: external_single_structure

get_tokens_for_qr_login_parameters()   X-Ref
Returns description of get_tokens_for_qr_login() parameters.

return: external_function_parameters

get_tokens_for_qr_login($qrloginkey, $userid)   X-Ref
Returns a WebService token (and private token) for QR login

param: string $qrloginkey the user key generated and embedded into the QR code for validating the request
param: int $userid the user the key belongs to
return: array with the tokens and warnings

get_tokens_for_qr_login_returns()   X-Ref
Returns description of get_tokens_for_qr_login() result value.

return: \core_external\external_description

validate_subscription_key_parameters()   X-Ref
Returns description of validate_subscription_key() parameters.

return: external_function_parameters

validate_subscription_key(string $key)   X-Ref
Check if the given site subscription key is valid

param: string $key subscriptiion temporary key
return: array with the settings and warnings

validate_subscription_key_returns()   X-Ref
Returns description of validate_subscription_key() result value.

return: \core_external\external_description