Jens Alfke
unread,Jan 20, 2014, 4:41:54 PM1/20/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mobile-c...@googlegroups.com
Hm, I'm not sure what aspect your question is focusing on. Are you asking about user registration and authentication, or about how your Java code can access the documents managed by the Sync Gateway?
If the question is authentication: The answer is to have the client communicate with your Java servlet to register, and then have the servlet call the Gateway's admin REST API to create a user account.
If you're asking about accessing documents: the best-supported mechanism for this currently is to use the Gateway's REST API, probably on the admin port so you can bypass authentication. We don't have good documentation of the API yet but it's basically a subset of CouchDB's, which is well-documented. It is also possible to interact directly with the underlying bucket using the Couchbase Server SDK, in limited ways: you can read documents as long as you ignore the "_sync" property and any documents whose keys begin with "_sync:". And you can create new documents as long as you set "importdocs":true in your database configuration.
—Jens