REST API for getting data

Hi, I am researching the possibility of using CouchBase for a project. If our payloads are exclusively JSON documents, it would be nice if we have direct access to CouchDB’s HTTP document APIs to get to the data. From the CouchBase document, it seems to indicate that data operations should be done via the memcached binary protocol just like Membase. Is there a way to use REST APIs akin to CouchDB’s to access the documents in CouchBase?

At the moment there is not, Couchbase Server 2.0 uses the memcached protocol for accessing data. We chose this for easy compatibility with our existing Membase users and also for the much higher performance that it can provide over the HTTP protocol.

If performance and scalability are not very much concern to you right now, I would recommend using the Couchbase “Single” product which exclusively uses the CouchDB HTTP interface.

The plan is to support the full HTTP protocol (as well as the memcached one) with our 3.0 product.


Thanks Perry for the quick response, do you know what that time frame will be (not holding you guys to it - not even expecting any specific feature, but just want to get a general sense if the cadence if there is one). I would love to see more details when the HTTP support is on the roadmap and how it might be done.

From looking at CouchDB, it seems to support horizontal scalability through replication (full or partial) but membase actually distributes data among the clusters. So it does not seem trivial to me to support the range of CouchDb HTTP APIs across the membase like cluster (maybe through map reduce?) Anyways, thinking out loud here but you guys are doing some exciting things. :slight_smile: Let me know if you can give me a ballpark of when I might be looking for the HTTP protocol support. This will help with my discussion with folks on my team.

Thanks Tim. As I mentioned, it’s currently scheduled for 3.0 but I don’t really have a timeframe for that yet.

Can I ask more about your use case? You will be able to get much higher performance using the memcached protocol than HTTP, so I wonder what parts of that interface you really need?

The work around the REST API at the top of Couchbase has started you can look at the design document here:


so it’s now possible with Couchbase 3.0 to get json documents directly by REST API without any additional modules like NGINX module? Because when I create document with ID 123 in default bucket and then try to get it via curl, Couchbase returns {"error":"not_found","reason":"missing"}.



Yes right now the solutions are to use something like NGINX module, build your own REST API (pretty easy with something like Spring Boot, RESTX or or use Sync Gateway’s REST API.