Hi John,
it doesn't exist because nobody wrote this function. We were working on a solution but nobody is working on it yet:
http://tracker.moodle.org/browse/MDL-29938. Note that I understand your question, me too sometimes I'm using other provider APIs.
As often similar remarks come back on the forum, I'd like to add my personal opinion in the hope to clarify some points about writing web services and the hope for a better API future:
a) often easy web services take more time that we would think. I wrote a document to help people to contribute a function to core:
http://docs.moodle.org/dev/How_to_contribute_a_web_service_function_to_corehttp://docs.moodle.org/dev/How_to_contribute_a_web_service_function_to_core
b) often other apps don't need the web service we request as client. For example the iOS Moodle app doesn't need the core_users_get_users_by_username().
c) writing a third party web service function is a good and fast alternative. But at the end the question is "why developers don't contribute the function back to core ?". I think the answer often comes to:
- not sure it's secured
- not sure it's compatible with all supported dbs/browsers/webservers/PHP version/etc.
- not sure it's respecting the moodle code logic
- don't have time to make it to the Moodle standards
Don't get me wrong, as I mentioned writing third party web services are a good alternative because you are not required to be:
- compatible others than your moodle install
- 100% respecting Moodle code logic (even thought you should take care to not be too far from it, otherwise you are going to give some wrong powers to the user)
- respecting the Moodle code style
- implementing PHPunit tests
- probable other stuffs that don't come to my mind
The basic requirement for your third party web services will be to respect the
permission code logic:
http://docs.moodle.org/dev/How_to_contribute_a_web_service_function_to_core#Capabilities_and_context_checks
Finally at HQ we are planning to have a week or two reserved for web services and hopefully increasing the Moodle core API. With the development of the HTML5 Moodle app being active, I'm sure more functions will be integrated to core. For the last word, most (if not all) the contributions to the core web services came from not HQ devs in the last major Moodle version
Cheers,
Jerome