I create a user using the sync gateway Admin API and i’m able to search for documents by ID but there is no way to search document by N1QL.
Then I realized that i can use “http://:8093/query/service” to make a N1QL query but when I try to do that with a user session that i’ve obtained from sync gateway it tells me “User does not have credentials to run SELECT queries on the bucket”
I was also confused that when I create a user in sync gateway…it doesn’t appear in the couchbase server under Security > Users.
My question are as follows:
- How come i can’t make N1QL query through sync gateway API
- How come there a 2 sets of users… one for sync gateway and one for couchbase server
- How do I allow a sync gateway user to make N1QL queries and only receive documents they are allowed to view based on sync gateway roles and channels