How to query couchbase for a document using the rest API -
i know how views, example:
http://127.0.0.1:8092/<my_bucket>/_design/all/_view/all?full_set=true&key=<my_document_key>&connection_timeout=60000
and tried:
http://127.0.0.1:8091/contacts/hello
(after creating via ui document key hello).
, response "not found."
what doing wrong?
thanks, michael
there no rest api retrieving documents key. can either write own thin service layer uses client sdk internally, or of couchbase 4.0, use n1ql rest api document through query key:
select * bucket use keys [docid];
you can read using n1ql service endpoint here: http://developer.couchbase.com/documentation/server/4.1/n1ql/n1ql-rest-api/index.html
(edit: changed n1ql syntax work. gerald.)
Comments
Post a Comment