Sync Gateway admin rest api couldn't create user


#1

So I have following configuration for Sync Gateway which connected to my Couchbase Server:
/opt/couchbase-sync-gateway/bin/sync_gateway -url="http://xxx.xxx.xxx.xxx:8091-bucket=“default” -interface=“xxx.xxx.xxx.xxx:4984” -adminInterface=“xxx.xxx.xxx.xxx:4985

I have tested the Pull and Push, both working perfectly.

I want to implement custom authorization for Sync Gateway, so I have look at this POST/{db}/_user example and try to do the post to sync gateway:
http://xxx.xxx.xxx.xxx:4985/default/_user

Header: application/json
Request Body:
{
“name”: “chef123”,
“password”: “1234”
}

The response status is 200, response body is just only two characters: []

I also tried to get the available users by doing GET on: http://xxx.xxx.xxx.xxx:4985/default/_user
But I just get the same response status 200 with response body only two characters: []

Am I missing anything here?


#2

Nevermind… I just notice I need to do the post over:

http://xxx.xxx.xxx.xxx:4985/default/_user/

instead of:

http://xxx.xxx.xxx.xxx:4985/default/_user