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

core_user_get_users bulk query

$
0
0
by Tyler Edmonds.  

Hello all!

I am trying to use the core_user_get_users endpoint to query for multiple emails at the same time. 

My URL is as follows:

...&moodlewsrestformat=json&wsfunction=core_user_get_users&criteria[0][key]=email&criteria[0][value]=email@email.com&criteria[1][key]=email&criteria[1][value]=email2@email.com

If I only use one entry, like criteria[0][key]=email&criteria[0][value]=email@email.com it works fine. 

But as soon as I add a second criteria[1][key]=email&criteria[1][value]=email2@email.com it throws an error. 

{
    "exception": "moodle_exception",
    "errorcode": "keyalreadyset",
    "message": "error/keyalreadyset"
}
 
I can't seem to find a way to query for 2 different emails at once, which would be preferable. 
 
I found this post from 2013 which indicates this is the proper way to provide multiple entries but it looks like that might be out of date. 
 
Any thoughts here? 


Viewing all articles
Browse latest Browse all 2364

Trending Articles



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