-
Notifications
You must be signed in to change notification settings - Fork 21
Understanding the $parameters in request() method
Lawrence Lagerlof edited this page Oct 9, 2018
·
1 revision
When using the request() method of this class, the parameters of the chosen webservice function must match the format required by the function. You can find this format in your Moodle API Documentation (change the IP to your Moodle):
http://127.0.0.1/moodle/admin/webservice/documentation.php
Each function has a specific parameters format to pass in URL:
Eg: core_group_get_groups has 3 sections (General structure, XML-RPC and REST). In the REST section you have the array format that you must follow:
REST
groupids[0]= int
Example of use in URL: &groupids[0]=1&groupids[1]=2
In array format this is: array('groupids' => array(1,2))