I've tried adding users using:
curl -X PUT -u myUsername:myPassword http://kaydee.iriscouch.com/_users/org.couchdb.user:myNewUsername -d '{"name":"myNewUsername", "password":"myNewUserPassword", "roles":["reporter", "reader"], "type":"user"}' -H "Content-Type: application/json"
The response was:
{"error":"bad_request","reason":"invalid_json"}
curl: (6) Could not resolve host: password
curl: (3) [globbing] error: bad range specification after pos 8
curl: (3) [globbing] unmatched close brace/bracket at pos 7
curl: (3) [globbing] unmatched close brace/bracket at pos 10
I'm using Windows 8. Is there any changes I need to make to the command?
And I believe IrisCouch is using CouchDB 1.2.
So, I found the answer. You need to replace the single-quote (') with double-quote (") and then escape the double-quote inside the JSON string (\"). I think this should be mentioned in the Acralyzer documentation so that Windows user don't need to go the extra step to find the solution.
curl -X PUT -u myUsername:myPassword http://kaydee.iriscouch.com/_users/org.couchdb.user:myNewUsername -d "{\"name\":\"myNewUsername\", \"password\":\"myNewUserPassword\", \"roles\":[\"reporter\", \"reader\"], \"type\":\"user\"}" -H "Content-Type: application/json"