Note: This documentation is for Moodle 2.7. For up-to-date documentation see Mobile web services.

Mobile web services: Difference between revisions

From MoodleDocs
(changed Settings to Administration)
(link edit)
 
(One intermediate revision by one other user 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 [[dev:Moodle Mobile]]. 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 ==
Line 16: Line 16:
== 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:
* enable the web services system (''Settings > Site administration > 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 (for backward compatibility with unmaintained My Moodle app)
* enable the xml-rpc protocol (for backward compatibility with unmaintained My Moodle app)

Latest revision as of 10:11, 25 February 2014

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 > Plugins > Web services > Mobile
  • Check "Enable mobile web services" 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'.
  • 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

See also