You are adding an extra illegal path element (/bbb) between the name of your bucket (/aaa) and the key.
If you are using the old url schema, you can either do a PUT on /riak/bucket/key or a POST on /riak/bucket. Age On Feb 17, 2013, at 22:35, Simon Majou <si...@majou.org> wrote: > Hello, > > It don't understand how to create new objects in an empty database. > > The dcumentation says we can create objects with or without key : > http://docs.basho.com/riak/1.2.1/references/apis/http/HTTP-Store-Object/ > > But at the same time we don't need to create the buckets, they are created > automatically : > http://docs.basho.com/riak/latest/tutorials/fast-track/Basic-Riak-API-Operations/ > > So how does Riak determine if we are creating an object with a key or we are > creating an object without a key ? > > I am trying to create an object (with a key) in version 1.2.1 and it fails : > > $ curl -XPUT -d '{"bar":"b"}' -H "Content-Type: application/json" -v > http://127.0.0.1:8091/riak/aaa/bbb/key > * About to connect() to 127.0.0.1 port 8091 (#0) > * Trying 127.0.0.1... connected > > PUT /riak/aaa/bbb/key HTTP/1.1 > > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 > > zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > > Host: 127.0.0.1:8091 > > Accept: */* > > Content-Type: application/json > > Content-Length: 11 > > > * upload completely sent off: 11out of 11 bytes > < HTTP/1.1 405 Method Not Allowed > < Server: MochiWeb/1.1 WebMachine/1.9.0 (someone had painted it blue) > < Date: Sun, 17 Feb 2013 21:32:59 GMT > < Content-Length: 0 > < Allow: GET, HEAD, POST > < > * Connection #0 to host 127.0.0.1 left intact > * Closing connection #0 > > (the bucket /riak/aaa/bbb doesn't exist but it should be created > automatically) > > Simon > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com