I tried to implement the very same functionality. I used cURL on Windows laptop (one endpoint) which was communicating to instance of Moqui (the other endpoint, the one with the /moqui/users service itself). This is what I did:
- installed cURL (http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/objectstorage/restrict_rw_accs_cntainers_REST_API/files/installing_curl_command_line_tool_on_windows.html)
- prepared the cURL command and data according to definitions in Swagger UI (http://localhost:8080/toolstatic/lib/swagger-ui/index.html?url=http%3A%2F%2Flocalhost%3A8080%2Frest%2Fservice.swagger%2Fmoqui#/users)
This is the sample data and the cURL command itselft. Watch out for syntax in Windows, the single quotas can mess it up. That is the reason, why the data is stored in file.
curl -X POST -u john.doe:moqui --header "Content-Type:application/json" --header "Accept:text/html" -d "@body.json" http://localhost/rest/s1/moqui/users
{"username":"edward","newPassword":"BhsmsAv1^^^.","newPasswordVerify":"BhsmsAv1^^^.","requirePasswordChange":"N","userFullName":"Edward Bolt","emailAddress":"ed@acme.com","currencyUomId":"EUR","locale":"sk","timeZone":"CET"}
Put this user data into file and name it body.json. Then run the command, there is a reference to body.json file. Hope this helps.