Thursday, August 30, 2018

Create couchdb user with curl


curl -X PUT http://admin:*****@couchdb.example.net/_users/org.couchdb.user:username \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"_id": "org.couchdb.user:username", "name": "username", "password": "********", "roles": [], "type": "user"}'

curl -X GET http://USER:PASSWORD@127.0.0.1:5984/_all_dbs