Search code examples
couchbasesql++

Couchbase (ver. >=5): How to create user using only N1QL


I'm aware of other, well documented methods of user managing like WebUI, CLI tools, API POST.. What I actually need is to have ability to create user only by issuing N1QL statement. I can't find such chapter under documentation or so. This leads me to confusion: is it possible at all? From other hand, I've found some code snippets where user is being create, but this is not too clear to me. Any help would be much appreciate. Cheers.


Solution

  • You need to use one of the options mentioned by you to create/drop users . There is no N1QL statement. You can use N1QL grant/revoke roles https://docs.couchbase.com/server/6.0/n1ql/n1ql-language-reference/grant.html