I tried to revive another thread of the same topic but I got crickets, so re-posting as a new topic.
I can’t create a db/bucket via the admin API. Looking at the headers, I’m not getting a 401 error, but a 502 bad gateway (which seems odd, since it can talk for many operations.
Here’s the command I’m trying:
curl -v -X PUT -H "Content-Type: application/json" \
http://localhost:4985/userdata/ \
-d '{"server":"http://couchbase:8091", "bucket":"userdata", "username":"<name>", "password": "<pwd>", "users":{}}'
And the relevant responses I get are:
Auth: Attempting credential authentication http://couchbase:8091
Error opening bucket userdata: no access
It seems like it’s trying to open an existing bucket ‘userdata’?
(As an aside, I’m not sure I understand the distinction between a database and a bucket, can a db have more than one bucket? If so, how would you specify in the sgw API syntax?)
Aside #2:
I’ve created two buckets via the couch admin panel. I can list them with the API ‘/_all_dbs’ and I’m able to put and get docs from them. So, that seems to be working, anyway.
Would like to not have to go into the UI to provision the db with the two buckets (and for that matter, the admin/adminpassword) if there’s a way to do that.