couchbase-sync-gateway

Android:How to use Couchbase REST API in android application?

旧城冷巷雨未停 提交于 2020-01-11 14:11:22
问题 I am new to android and couchbase.I am developing an android application where i need to call Couchbase REST API but i cant find any sample code for that.so please help me how to call couchbase REST API in android applicatin I have already referred the link but not getting any solution 回答1: public static HttpPost createPostForJSONObject( JsonObject params, String url) { HttpPost post = new HttpPost(url); post.setEntity(createStringEntity(params)); return post; } private static HttpEntity

Status 403 : SG Wrong User while using Couchbase

偶尔善良 提交于 2020-01-05 03:48:11
问题 I'm sending a POST request to add Document to Couchbase Server via Sync Gateway Server. I'm using serviceconfig.json, similar to link. server key in "databases" contains a link to my Couchbase Server (http://localhost:8091). While firing the POST request, it shows a response shown below. Also, I have added the logs below, 404 no such database "fineract-cn" 400 invalid database name "favicon.ico" 回答1: The response indicate you are not posting a doc with a proper user authentication. You need

Couchbase,Where to add config.json for windows Installation?

这一生的挚爱 提交于 2019-12-14 03:20:28
问题 I am trying to implement Couch base in my android app following the couchbase tutorial link here I need to add a config.json file to create my own database link rather than using its default database "Sync_gateway".According to explanation it should be inside bin directory inside a data folder but I can't find a bin directory as I installed sync gatway from .exe file. I don't find run it by any command other than clicking the .exe file. What I am I missing? 回答1: If you have installed sync

Query sync gateway buckets using N1QL

左心房为你撑大大i 提交于 2019-12-13 13:15:22
问题 I wanted to know if it's possible to query the sync gateway buckets using N1QL? Does it behave as a normal couchbase bucket or because of the metadata that sync gateway adds, is it possible to query it only through Rest APIs? Currently I have a webhooks handler, which keeps a replica of the documents residing under sync gateway buckets. I need to do some aggrgations which need to be pushed back to clients. So, can I do all this heavy lifting directly trhough n1ql on sync gateway or using