Error in REST API using Ok Tech

Error in REST API using Ok Tech

by amol gupta -
Number of replies: 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.

Average of ratings: -
In reply to amol gupta

Re: Error in REST API using Ok Tech

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

In reply to Patrick Pollet

Re: Error in REST API using Ok Tech

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

In reply to Sebastian Vassiliou

Re: Error in REST API using Ok Tech

by Patrick Pollet -
Me too )-: I am in holidays until Beginning of september Cheers