CouchbaseMobile Replicate specific Channel (REST API)

36 views
Skip to first unread message

Shiv Veerashetty

unread,
Dec 21, 2015, 1:24:27 AM12/21/15
to Couchbase Mobile
Hi Team,

To replicate documents, i am using rest apis in my ionic application.
Can some tell me , how to replicate from specific channels only ?

As per above  document the api accept only 3 params
{ "create_target" : true, "source" : "http://sync.couchbasecloud.com/beer-db/", "target" : "beer-db", }

My requirement is to pull / replicate from specific channels only.

Thanks & Regards
Shiv

Jens Alfke

unread,
Dec 21, 2015, 2:02:18 PM12/21/15
to mobile-c...@googlegroups.com

On Dec 20, 2015, at 10:24 PM, Shiv Veerashetty <shiv.vee...@gmail.com> wrote:

To replicate documents, i am using rest apis in my ionic application.
Can some tell me , how to replicate from specific channels only ?

add
“filter”: “sync_gateway/bychannel”,
“channels”: “foo,bar”

Sorry this isn’t documented; the REST API docs are pretty incomplete. CouchDB’s docs are better, but also incomplete; for example they don’t mention the “filter” property either. The old CouchDB wiki does document filters.

—Jens

Shiv Veerashetty

unread,
Dec 22, 2015, 6:23:41 AM12/22/15
to Couchbase Mobile
Thanks a lot Jens. I will try this and update.

Best Regards
Shiv
Reply all
Reply to author
Forward
0 new messages