I am not sure to understand exactly what you are doing, but let me clarify some things.
1- If you are using Couchbase Lite (Couchbase on your mobile http://mobile.couchbase.com ) you have to use the local Android API and let the system synchronize with your Couchbase cluster using the Sync Gateway. You are not responsible of the “get/put” from the cluster this is done by the gateway
2- If you want to push date directly from your Android phone to the Couchbase cluster, (so you do not store any data on your mobile in Couchbase), you cannot use the gateway for that, it is not made for that. You have to create your own REST interface to get/put/delete data from your database.
Yes, I am trying to push json data directly from a Android phone to the Couchbase cluster.
When I create a document through the REST API by the gateway: curl -X PUT -H ‘Content-Type: application/json’ http://IP:4984/sync_gateway/DOCUMENT_ID -d JSONDATA
the new document is created sucessfully, including the ‘_sync’ data.
But I’m not able to push date in same way from phone. I’ve tried what I do in CouchDB, but it doesn´t work.
My mistake was so simple like that in CouchDB you can push the data without the Document_Id, because it’s automatically assigned. However, in Couchbase you must assign one.
Thank you very much, and sorry for the inconvenience.