joes
1
I have a single-node Couchbase cluster with data service only that gets data over XDCR from my main Couchbase cluster.
Through the browser GUI, I’m able to retrieve a document by ID, even without a query service – from the Document tab.
Is there any way to retrieve a document by ID through the REST API without using the query service?
I’ve attached a picture of the Document page in the web GUI to further illustrate the service I want to access through the REST API.
Thank you.
vsr1
2
curl -u user:pass http://{host}:8091/pools/default/buckets/{bucket}/docs/{key}
curl -u Administrator:password http://localhost:8091/pools/default/buckets/default/docs/k01
{"meta":{"id":"k01","rev":"11-16dc1596c97400000000000000000000","expiration":0,"flags":0},"json":"{\"a\":1}","xattrs":{}}
“json” value encoded document
Also check out cbc utility Couchbase C Client: cbc(1) - Couchbase Client Commandline Utility
1 Like