Mobile web services: Difference between revisions

From MoodleDocs
(Removed outdated information)
 
(34 intermediate revisions by 13 users not shown)
Line 1: Line 1:
'''NOT IMPLEMENTED YET'''
{{Web services}}
Tracker issue: MDL-27551
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 ==
Moodle 2.1 comes with a built-in web service designed for mobile applications. It is required to run the official [https://docs.moodle.org/en/Development:Mobile_app Moodle app]. Enable it only if you want people to use the official app or if third party app explicitly requires it.
A site administrator first must enable mobile web services:
 
*In ''Administration > Site administration > Advanced features''
== Enable the mobile web services ==
*Check "Enable web services for mobile devices" and then
Go to ''Administration block > Plugins > Web services > External services.''
*Click Save.
Check ''Enable mobile web services'' and ''Save''.
That's it! No other steps required.
 
'''That's it! Not other steps required.''' The rest of this document has for purpose to explain you the "behind the scene" for any further mobile service customization.
 


The rest of this document explains the "behind the scenes".
== What happens when the service is enabled ==
Enabling the mobile web services will automatically:
Enabling the mobile web services will automatically:
* enable the web services system (''Administration block > Advanced features'')
* 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 built-in external service called 'Mobile web services' - you should see this new mobile service listed as enabled
* enable the xml-rpc protocol
* 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 ==
It is not possible to edit this mobile service.
When you uncheck 'Enable mobile web services', it will automatically disable the external service called 'Mobile web services'.


== Disable the 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.
When you uncheck 'Enable mobile web services', it wil automaticallyl:
==See also==
* disable the external service called 'Mobile web services'.
* [[Mobile app]]
*if 'Mobile web services' is the only external service enabled:
[[Category:Mobile]]
** disable the web services system
[[de:Mobile Webservices]]
** disable the xml-rpc protocol
[[ja:モバイルウェブサービス]]
** disallow the 'webservice/xmlrpc:use' capability for authenticated user role
[[es:Servicios web para móviles]]
[[fr:Services Web mobile]]

Latest revision as of 08:00, 18 August 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 > Advanced features
  • 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 rest protocol
  • 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