Querying view Using the REST API fail

hello, I try to use REST API to access view by entering following url:

the response is “Not found”

question here:

  1. why in the example below , we use port 8092 instead of 8091 which is port of couchbase server, i assume we should be use port for server not bucket

  2. if it’s SASL password-protected bucket but password is empty, should i use

3.can I use character ‘@’ in password.

4."Not found " here means cannot find bucket or cannot find view? I can access admin portal via:

thanks in advance!

1.The views are build in couchDB. So to access them you have to do a rest call to port 8092.
you can curl http://localhost:8092
It should return a hello greeting and tell you its an couchDB instance.

Can use any of the SDK’s to access couchbase? They have lots of great built in tools to access views.

I tried localhost:8092, no greet message show up. in fact, cannot connect to localhost:8092, but port 8092 is open.

I have not tried SDK yet, but if it’s an API via http request , i should be able to see response in web browsers?

thanks again!

problem solved. need to add portal 8092 to iptables.


Just to be sure I am pointing to the right documentation page, you can see the list of port that you need to open to work with Couchbase here:

You are correct, once you have open the port you can access/execute the query from your browser.

As Househippo mentioned, you can use the SDK API to query the views, for example in Java:

Let us know which programming language you are using and I will point your to a code snippet.