This API doesn't exist in CiviCRM but if you want to stick with CiviCRM API (which is better if you want to keep it CMS agnostic), you could create a new CiviCRM API which is not too complex if you are a developer.
With civix installed, it would require to :
- create an extension `civix generate:module thenewextension
- go in
thenewextension
and generate the api civix generate:api MyEntity myaction
- a new file should be created in
api/v3/MyEntity/myaction.php
- in the php, call the CMS agnostic function
$ufID = CRM_Core_BAO_CMSUser::create($params, $mail);
and add the logic you want
- activate the extension
- you should be able to see your api and test it in `https://www.mysite.com/civicrm/api
To call the API using REST, you need to call the url with the correct parameters (or more likely use a python library that will do much of the work for you) :
https://www.mysite.com/sites/all/mdoules/civicrm/extern/rest.php?entity=MyEntity&action=myaction&api_key=(myAPIkey)&key=(mySiteKey)&json={“first_name":"xxx","last_name":"yyy","username":"zzz"}
myAPIkey
must be created on a contact with the api permission in the database -> civicrm_contact table (or use a handy extension https://civicrm.org/fr/extensions/api-key)
mySiteKey
is in civicrm.settings.php
json
contains the parameters of your api call