Does Predix Mobile Couchbase Replication to Device include Views?
Scenario: 1. Create a Custom View in Couchbase Server Side(Predix Mobile Service CouchDB) 2. Replicate Data to phone using pmapi + Predix Container for iOS 3. Query view using pmapi as per this page
Issue: 1. We get an error response in #3, error as below. { "status": 501, "error": "unimplemented" }
Different Approach tried: 1. Create the views locally (using pm container for iOS) using pmapi and then query all docs to verify if views were created. 2. Query the view using pmapi 3. Same Error. 4.
Are we missing anything? Do we have to create Views on device in Container code??
Answer by Andy Johns · Mar 16, 2017 at 09:17 AM
Server views only exist on the server. Client views must be created on the client, in native code.
Please refer to various documentation on views here:
You don't list the URL you're calling to query the view, but a 501 error from the client PMAPI call means you're attempting to call a service that doesn't exist. Client services are called with the URL pattern: http://pmapi/{serviceid}/.... In your case you're calling an incorrect {serviceid}. Currently it would be the "cdb" service you'd use to call views. As described in the Querying Views item above.
Predix Mobile Database Low level Access API not working - 1 Answer
Sync gateway returns corrupted image 3 Answers
Predix Mobile client core services 1 Answer
Not able to get "pm publish" command working 1 Answer
pm publish -> couch returned 503 2 Answers