Sync Gateway REST API not working to create multiple views


Creating views with the Sync Gateway REST API does not seem to work for more than one view. When there are multiple views included in the json, all views will uploaded to the server fine, but only one view in the bulk upload actually works. All other views remain empty despite multiple refreshes.

Is it possible to upload multiple views with this Sync Gateway REST API?

NOTE: I’ve validated each of the views (map / reduce functions) works by uploading them independently, but when included in a list of multiple views only one of the views will produce results. I’ve also tried doing multiple uploads to the same design path, but get the same result. Manually building them in dev and publishing them works fine. I am uploading via the admin port.


This issue has been fixed on master, but isn’t in an official release yet:

If you don’t want to build from master, you can workaround for the time being by either building in dev (as you describe), or storing each view in a separate design doc.


Thanks Adam.

I’ll pull down master and build from there.