Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

REST Web service - Missing required key in single structure: groups

$
0
0
by Alex Legg.  

So the following is a REST call to sever.php, It successfully uses the token and calls the external function:

http://collectiveintelligencerepository.com/webservice/rest/server.php?wstoken=dd70e39c37d50d9e806305eab51c4593&wsfunction=local_myplugin_create_groups

The required parameters from the accessible external function are:

courseid => PARAM_INT
name => PARAM_TEXT
description => PARAM_RAW
enrolmentkey => PARAM_RAW

I have tried the following:

http://collectiveintelligencerepository.com/webservice/rest/server.php?wstoken=dd70e39c37d50d9e806305eab51c4593&wsfunction=local_myplugin_create_groups&courseid=10&name=tgmg&description=thisisadescription&enrolmentkey=5

And get an error...

<EXCEPTIONclass="invalid_parameter_exception">
<ERRORCODE>invalidparameter</ERRORCODE>
<MESSAGE>Invalid parameter value detected</MESSAGE>
<DEBUGINFO>Missing required key in single structure: groups</DEBUGINFO>
</EXCEPTION>


Viewing all articles
Browse latest Browse all 2361

Trending Articles