I am writing an iOS application using CouchBase-Lite that will sync back to 
a Couchbase Server via the sync gateway.  I may also need the ability to 
read/update/create documents from another application, like a web 
application.  Based on this limitation 
 

> It cannot operate on pre-existing Couchbase buckets with app data in them 
> because Sync Gateway has its own document schema and needs to create and 
> manage documents itself. You can migrate existing data by creating a new 
> bucket for the gateway and then using the Sync REST API to move your 
> documents into it via PUT requests. You can’t make changes to the Couchbase 
> bucket directly. You have to go through the Sync Gateway API

 
I am trying to understand how to insert and update documents via the 
Sync-Gateway REST API.  The insert seems pretty straight forward using the 
PUT /db/docid method but I'm not understanding the update scenario.  I have 
tried POST'ing to /db/_bulk_docs but I clearly do not understand the body 
structure the API is expecting as I receive an error that "interface is 
nil" in the sync gateway.
 
I guess my first question is, is the approach I am pursuing the correct 
approach.  And second, how should I format my POST to update existing 
documents via the Sync-Gateway.
 
Thank You
Mike Mayer

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/6b8244d8-94e0-47c6-abe8-6446e760ff9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to