How to curl a key/value


I have the default bucket with a document named lights and a value of on

I can get this with python, ruby, and node quite easily. What I would like to do is get this via curl.

What i need to do is get the value of lights via curl and I cannot seem to figure out how to do this.
Can someone help?


@jeffn well there are two ways via curl, but both have the issue of not being cluster aware. So it depends if you just want to try something out or do something that needs to go into production :wink: In any case, N1QL and Views are both accessible over HTTP so you can use curl for that.

If you need something production ready, your best bet is exposing HTTP endpoints via your python, ruby or node apps. On which server version are you on?


Thanks for your reply. I am on 4.0 community edition. Cluster aware would be important.
That being the case, it sounds like exposing endpoints via the node app (or whichever language) is the way to go then.Was hoping I was missing something :slight_smile:

@jeffn yes, using node and exposing the endpoints is the best option it seems. Couchbase does not provide something like that out of the box :slightly_smiling: