Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know what the parameters are for Moodle Webservices' functions such as core_user_create_users

Using curl, I'm trying to make a rest call to the web service function to create a user. However, I'm oblivious as to what the required parameters are and can't find any documentation on this.

I'm getting the error:

url: mymoodle/webservice/rest/server.php?wstoken=304632866235d8239cd7bf41809dcd03&wsfunction=core_user_create_users&criteria[0][key]=username&criteria[0][value]=name&criteria[1][key]=password&criteria[1][value]=password

Invalid parameter value detected Missing required key in single structure: users

like image 849
succeed Avatar asked Nov 19 '25 13:11

succeed


1 Answers

The api documentation that provides more extensive documentation on not only what the required parameters are for all the available webservice functions but also the expected response and their structures in both REST and XML-RPC is accessible from the moodle site.

For access to these docs you must have admin access as they are found in admin submenu located at :

site administration > Plugins > Web services > API Documentation

Parameters for the 'core_user_create_users' function

like image 180
succeed Avatar answered Nov 22 '25 04:11

succeed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!