Error in REST API using Ok Tech

Error in REST API using Ok Tech

par amol gupta,
Nombre de réponses : 3

As specified in Moodle Docs for OKTech Web Services, i tried to use OKTech WebService over REST by including wsfunction and wsformatout in HTTP request like below.

http://yourmoodle/wspp/service_pp2.php?username=alogin&password=apassword&wsfunction=login&wsformatout=dump

But i am getting following results:

Ce serveur SOAP peut g�rer les fonctions suivantes : __construct

exception_handler

login

logout

edit_users

get_users

….

Please help.

Moyenne des évaluations: -
En réponse à amol gupta

Re: Error in REST API using Ok Tech

par Patrick Pollet,

I suspect that you do not have installed the latest release of OK Tech from github.https://github.com/patrickpollet/moodlews

Your call to login should work and return a login result object like this

loginReturn Object
(
    [client] => 40979
    [sessionkey] => 4c7c041920ce66990ac3b5a1efa848c8
)

 

This error means that your GET parameters were not recognized.

Also try the 'singleshot mode' where login operation is not required

http://localhost/moodle.195/wspp/service_pp2.php?wsusername=xxxx&wspassword=zzz&wsfunction=get_roles&wsformatout=dump

Cheers.

En réponse à Patrick Pollet

Re: Error in REST API using Ok Tech

par Sebastian Vassiliou,

jeeeeesh i had the very same problem and was going nuts the whole afternoon.

uploaded the git version and boom, everything i coded suddenly started working. need a beer sourire