Admin rest api to create db

hi all
I’m trying to create db to rest api using curl:

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:4985/db/' \
  -d '{ "server":"http://localhost:8091", "bucket": "frette-bucket", "users": { "user": {"password": "ppp", "admin_channels": ["*"]} } }'

on same machine on gateway but i got:

{"error":"Bad Gateway","reason":" Unable to connect to Couchbase Server (connection refused). Please ensure it is running and reachable at the configured host and port.  Detailed error: HTTP error 401 Unauthorized getting \"http://localhost:8091/pools\": "}

couchbase server is correctly up and running on same gateway machine

You got an auth error (401) connecting to Couchbase Server, so it sounds like you need to provide credentials for the server in the config.

(It’s been a long time since I worked on Sync Gateway, so I can’t quote you the exact parameters to add to your JSON, but it’s in the SG config documentation.)

Were you able to resolve this ? The sync gateway config params are described in