List of required parameters for web service requests

List of required parameters for web service requests

by Jeff Shrek -
Number of replies: 1

I am having trouble finding a list the required parameters for each api call.

For example, this call works fine, as it does not require any parameters:

core_course_get_courses

However, as another example, when I attempt any of these three, I get an error because I do not know what parameters I need to submit with it:

core_enrol_get_enrolled_users
core_enrol_get_users_courses
core_enrol_search_users

These three calls return:

[exception] => invalid_parameter_exception
[errorcode] => invalidparameter
[message] => Invalid parameter value detected

So where can I find these api calls with a list of the required parameters for each.


Average of ratings: -
In reply to Jeff Shrek

Re: List of required parameters for web service requests

by Jeff Shrek -
Thanks to @Mark_Johnson to pointed me to this:

Log in to your site as an administrator, and go to Site Administration > Server > Web Services > API Documentation
This will list all the web service functions currently available on your site, which you can expand to show details of the parameters.

The direct link is something like this:
https://mydomain.com/moodle/admin/webservice/documentation.php