I would like to know if it is possible to enroll a new user via API/Web Service. My aim is to enroll the student by giving username, password, firstname, lastname, cohort and some courses to enroll him to (as if it were done through a csv file). Moreover, I need to force the user to change his password at his first login.
I checked Enrolment API (https://docs.moodle.org/dev/Enrolment_API) but it seems there's nothing that can help me. I also noted that using DB queries to do that is not recommended.
Thank you in advance