You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Benjamin Young <be...@couchone.com> on 2011/02/01 16:53:36 UTC

Re: _user-API

Hey Maxwell,

Should be a simple fix. You've got "_user" in the URL, and it should be 
"_users"

Hope that does the trick.

Later,
Benjamin

On 1/22/11 4:45 AM, 137maxwell wrote:
> Hi all,
>
> I'm new with couchDB and trying to setup an example from the german book
> "CouchDB - kurz&gut".
>
> I just created a test app with "couchapp generate todoapp" and pushed it to
> the DB and everything works fine.
>
> Now the book says to add a user by the command:
>
> "curl -vX POST http://admin:secret@localhost:5984/_user -d
> 'username=bob&password=kelso&roles=user'
>
> The admin exists, the password is set up, but doing this I get the the error
> msg:
>
> {"error":"illegal_database_name","reason":"Only lowercase characters (a-z),
> digits (0-9), and any of the characters _, $, (, ), +, -, and / are allowed.
> Must begin with a letter."}
>
> I search for any solutions but wasn't successive. I am aware of the fact,
> that a database must not begin with a "_", but in this situation I
> understand the "_user" not as a database but as a part of the API.
>
> Any suggestions?
>
> Thanks a lot,
> maxwell
>


Re: _user-API

Posted by 137maxwell <13...@gmx.de>.
Hi Benjamin,
that works.

Thanks a lot,
maxwell


On 1 February 2011 16:53, Benjamin Young <be...@couchone.com> wrote:

> Hey Maxwell,
>
> Should be a simple fix. You've got "_user" in the URL, and it should be
> "_users"
>
> Hope that does the trick.
>
> Later,
> Benjamin
>
>
> On 1/22/11 4:45 AM, 137maxwell wrote:
>
>> Hi all,
>>
>> I'm new with couchDB and trying to setup an example from the german book
>> "CouchDB - kurz&gut".
>>
>> I just created a test app with "couchapp generate todoapp" and pushed it
>> to
>> the DB and everything works fine.
>>
>> Now the book says to add a user by the command:
>>
>> "curl -vX POST http://admin:secret@localhost:5984/_user -d
>> 'username=bob&password=kelso&roles=user'
>>
>> The admin exists, the password is set up, but doing this I get the the
>> error
>> msg:
>>
>> {"error":"illegal_database_name","reason":"Only lowercase characters
>> (a-z),
>> digits (0-9), and any of the characters _, $, (, ), +, -, and / are
>> allowed.
>> Must begin with a letter."}
>>
>> I search for any solutions but wasn't successive. I am aware of the fact,
>> that a database must not begin with a "_", but in this situation I
>> understand the "_user" not as a database but as a part of the API.
>>
>> Any suggestions?
>>
>> Thanks a lot,
>> maxwell
>>
>>
>