Webservice get roles

General plugins (Local) ::: local_wsgetroles
Maintained by corvus albus
This local plugin allows you to get moodles roles via REST API. There is no possibility to get role ids directly via rest api, though there are two core functions demanding for role id: core_role_assign_roles and core_role_unassign_roles.
Latest release:
36 sites
47 downloads
Current versions available: 1

This local plugin allows you to get moodles roles via REST API. There is no possibility to get role ids directly via rest api, though there are two core functions demanding for role id: core_role_assign_roles and core_role_unassign_roles.

The function local_wsgetroles_get_roles is added to the rest api. You can give over lists of roleids, rolenames and/or roleshortnames and get the associated roleinformations (id, name, shortname, description, sortorder, archetype). If the given id, name, shortname has no corresponding role, roleinfomations will be "null" despite of the search entry. If you give over empty lists all roles will be returned.

Some example calls to the webservice function:

The webservice documentation for the above functions can be found at http://yoursite.com/admin/webservice/documentation.php.

After installing the plugin you have to add the functions to your rest-service.

This plugin can be installed by following the official Moodle documentation - Installing plugins.
This plugin can be used in accordance with the official Moodle documentation - Using web services.

Potential privacy issues

None.

Screenshots

Screenshot #0
Screenshot #1

Contributors

corvus albus (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
Please login to post comments