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
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

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