CBL Lite - cant access _design/design/_view/view

59 views
Skip to first unread message

pasan mabotuwana

unread,
Oct 20, 2014, 4:54:27 AM10/20/14
to mobile-c...@googlegroups.com, pasa...@gmail.com
I setup CBL lite and I can query (REST) the db to get for eg to get all documents by doing (localhost:port/dbName/_all_docs).

The question is when I try to query views for eg localhost:port/_design/employee/_view/by_username I get the following 

{"status":501,"error":"unimplemented"}

Can anyone help out to access views though a rest call

Jens Alfke

unread,
Oct 20, 2014, 2:17:22 PM10/20/14
to mobile-c...@googlegroups.com, pasa...@gmail.com

On Oct 20, 2014, at 1:54 AM, pasan mabotuwana <pasan....@gmail.com> wrote:

The question is when I try to query views for eg localhost:port/_design/employee/_view/by_username I get the following 

That's not a valid URL; it's missing the database name before _design. If you're having trouble, please copy/paste the exact URL. Also, what platform is this?

—Jens

pasan

unread,
Oct 21, 2014, 12:48:03 AM10/21/14
to mobile-c...@googlegroups.com, pasa...@gmail.com

Oops, when posting made the mistake. sample url goes like - http://10.10.10.131:8080/testdb/_design/employee/_view/by_username

just to explain a bit on what Im trying to accomplish.  

There's a webapp that uses couchDB running on a pc, and i want to have the couchdb running on an ios device, so that the webapp can be ported to run on ios. 

Currently the replication process works fine and through the CBL listener I can perform basic operations like-

but the moment I try to access a design/view, it says 501 unimplemented. 

Has anyone accessed design/view with couchbase lite through the cbl listener ?

-

Jens Alfke

unread,
Oct 21, 2014, 1:45:06 AM10/21/14
to mobile-c...@googlegroups.com, pasa...@gmail.com

On Oct 20, 2014, at 9:48 PM, pasan <pasan....@gmail.com> wrote:

There's a webapp that uses couchDB running on a pc, and i want to have the couchdb running on an ios device, so that the webapp can be ported to run on ios. 

 Oh, I see — are you trying to use a view implemented in JavaScript in a design document?
To do that you'll need to build in the JavaScript view support, whose source files are in the "Extras" folder. See the readme file in that folder for details.

—Jens

pasan

unread,
Oct 21, 2014, 6:11:09 AM10/21/14
to mobile-c...@googlegroups.com, pasa...@gmail.com
Thanks a lot. got it working. 

Reply all
Reply to author
Forward
0 new messages