Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Mobile web services.

Mobile web services: Difference between revisions

From MoodleDocs
(→‎What happens when the service is enabled: note about security overview report default role for all users check)
(Behavioural change: since MDL-73414 disabling mobile web services does not disable the web services system.)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Web services}}
{{Web services}}
Moodle comes with a built-in web service designed for mobile applications. It is required to run the official [[Mobile app]]. Enable it only if you want people to use the official app or if a third party app explicitly requires it.
Moodle comes with a built-in web service designed for mobile applications. It is required to run the official [[Mobile app]]. Enable it only if you want people to use the official app or if a third-party app explicitly requires it.
 
== Enabling mobile web services ==
== Enabling mobile web services ==
A site administrator first must enable mobile web services:
A site administrator first must enable mobile web services:
 
*In ''Administration > Site administration > Mobile app > Mobile settings''  
*In ''Administration > Site administration > Plugins > Web services > Mobile''  
*Check "Enable web services for mobile devices" and then
*Check "Enable mobile web services" and then
*Click Save.
*Click Save.
That's it! No other steps required.
That's it! No other steps required.


The rest of this document explains the "behind the scenes".
The rest of this document explains the "behind the scenes".
== What happens when the service is enabled ==
== What happens when the service is enabled ==
Enabling the mobile web services will automatically:
Enabling the mobile web services will automatically:
Line 22: Line 17:
* allow the 'webservice/xmlrpc:use' capability for authenticated user role
* allow the 'webservice/xmlrpc:use' capability for authenticated user role
* allow the 'webservice/rest:use' capability for authenticated user role
* allow the 'webservice/rest:use' capability for authenticated user role
Note: When mobile web services are enabled, the [[report/security/report security check defaultuserrole|security overview report default role for all users check]] will have status 'Critical' due to the webservice capabilities being allowed for the authenticated user role.
== Disabling mobile web services ==
== Disabling mobile web services ==
When you uncheck 'Enable mobile web services', it will automatically:
When you uncheck 'Enable mobile web services', it will automatically disable the external service called 'Mobile web services'.
* disable the external service called 'Mobile web services'.
*if 'Mobile web services' was the only external service enabled:
** disable the web services system
** disable the xml-rpc protocol
** disable the rest protocol
** remove the 'webservice/xmlrpc:use' capability for authenticated user role
** remove the 'webservice/rest:use' capability for authenticated user role


Prior to MDL-73414, the web services system and the REST protocol were additionally disabled, and it was not possible to enable the web services system unless an external service was enabled. This was not consistent with the web services usage documentation, where the first step was the activation of web services, whether or not an external service was enabled.
==See also==
==See also==
* [[Mobile app]]
* [[Mobile app]]
[[Category:Mobile]]
[[Category:Mobile]]
[[de:Mobile Webservices]]
[[de:Mobile Webservices]]
[[ja:モバイルウェブサービス]]
[[ja:モバイルウェブサービス]]
[[es:Servicios web para móviles]]
[[es:Servicios web para móviles]]
[[fr:Services Web mobile]]

Latest revision as of 23:40, 10 January 2022

Moodle comes with a built-in web service designed for mobile applications. It is required to run the official Mobile app. Enable it only if you want people to use the official app or if a third-party app explicitly requires it.

Enabling mobile web services

A site administrator first must enable mobile web services:

  • In Administration > Site administration > Mobile app > Mobile settings
  • Check "Enable web services for mobile devices" and then
  • Click Save.

That's it! No other steps required.

The rest of this document explains the "behind the scenes".

What happens when the service is enabled

Enabling the mobile web services will automatically:

  • enable the web services system (Administration > Site administration > Advanced features)
  • enable the built-in external service called 'Mobile web services' - you should see this new mobile service listed as enabled
  • enable the xml-rpc protocol (for backward compatibility with unmaintained My Moodle app)
  • enable the rest protocol
  • allow the 'webservice/xmlrpc:use' capability for authenticated user role
  • allow the 'webservice/rest:use' capability for authenticated user role

Disabling mobile web services

When you uncheck 'Enable mobile web services', it will automatically disable the external service called 'Mobile web services'.

Prior to MDL-73414, the web services system and the REST protocol were additionally disabled, and it was not possible to enable the web services system unless an external service was enabled. This was not consistent with the web services usage documentation, where the first step was the activation of web services, whether or not an external service was enabled.

See also