Predix_Logo
  • Categories
    • Questions
    • Predix | Updates
      • Pricing
      • Product
    • Deloitte - Private
    • How-To
    • Accenture-Private
  • Explore
    • Topics
    • Questions
    • Articles
    • Feedback or Feature Requests
  • Sign in
  • Home /
  • Questions /
avatar image
0
Question by amit.lulla@ge.com · Mar 15, 2017 at 10:30 PM · mobile-servicepmviews-servicecouchbase

How to create & access Predix Mobile Couchbase Views

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??

Comment
Add comment
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
0

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:

  • Creating Views

  • Querying Views

  • iOS Native Code documentation: ViewDefinition

  • iOS Native Code documentation: appendDataViewDefinition

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.

Comment
Add comment · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

80 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

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

GE Monogram
  • Legal
  • Cookies
  • Forum Terms
  • Contact Us
  • Copyright © 2017 General Electric Company. All rights reserved.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Submit your feedback or feature request
  • Categories
  • Questions
  • Predix | Updates
    • Pricing
    • Product
  • Deloitte - Private
  • How-To
  • Accenture-Private
  • Explore
  • Topics
  • Questions
  • Articles
  • Feedback or Feature Requests