Trying to hit the Admin Rest API of Sync-Gateway version 2.1
The request is made in a nodejs app
var options = {
method: 'POST',
url: `http://localhost:4985/db/_user/`,
body: {
name,
password,
admin_channels,
admin_roles,
disabled
},
json: true
}
request-promise(options)
This is giving me a 301, and I’m assuming it has to do with how node makes the request and SG thinking node isn’t on the host machine
I’m unsure where this endpoint could have been moved to?
I’m running sync-gateway in a docker container
I’m also port forwarding correctly that I can make requests with postman and curl to add users
When I simply hit the admin endpoint with
var options = {
method: 'GET',
url: `http://localhost:4985`,
}
return rp(options)
I get
conenction {"ADMIN":true,"couchdb":"Welcome","vendor":{"name":"Couchbase Sync Gateway","version":"2.1"},"version":"Couchbase Sync Gateway/2.1.2(2;35fe28e)"}