REST protocol (with JSON/XML payload support)
Maintained by
Owen Barritt
REST webservice protocol based on the standard core REST webservice, but with added support for JSON & XML payloads
and supports using HTTP ACCEPTS headers for determining response format.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
I've used your plugin and found it is very well performing and any web developer can use it very easily
I try to use Moodle webservice within google apps, so json could be great to use, but I cant get that plugin to work.
Generally Moodle is not easy platform for anybody. So,
* my Moodle version is 3.1
* permission webservice/rest:use -> allow (standard REST works)
* token is valid (standard REST works)
* plugin webservice_restjson is enabled (0.4 for Moodle 2.9+ 2016021900)
* protocol REST protocol (with JSON/XML input support) -> enabled
request:
curl -H "Content-Type: application/json" -X GET http://elearning.casadelalengua.pl/webservice/restjson/server.php?wsfunction=core_course_get_courses&wstoken=33ff697d305xyz
I've got
{"exception":"webservice_access_exception","errorcode":"accessexception","message":"Wyj\u0105tek w kontroli dost\u0119pu"}
so I don't know what still I have wrong.
Can you help me with this problem?
Because the request format is ambiguous. I couldn't understand how to send the "request Object". so I tried this and it worked :
curl -k -X POST -d "id=63&filename=windiff.zip" "https://localhost/moodle/webservice/rest/server.php?wsfunction=local_wstemplate_hello_world&wstoken=f5b0854a870e05f960cff39fc2a40665"
hope it helps