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

Re: Calling "core_user_get_users" function using REST API

$
0
0
by Bill Antonia.  

Here is an example:

http://www.domain.com/moodle/webservice/rest/server.php?wstoken=averylongstringforatoken&wsfunction=core_user_get_users_by_field&field=email&values[0]=a.name@some.domain.com

Replace the field name and the value as appropriate but keep it as an array ie for another person add &values[1]=a.notherperson@some.domain.com to the above to return two results.

In your example you are searching on the field username but you are using a numeric for the search string. Your first example has the incorrect format however in the second the format is correct.

Not sure about the conversion to Json though, my library creates Java objects from the returned XML data.

Regards

Bill


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>