Product tutorials, how-tos, and fully-documented APIs.

HTTP Delete Object

    Deletes an object from the specified bucket / key.

    Request

    DELETE /riak/bucket/key           # Old format
    DELETE /buckets/bucket/keys/key   # New format
    

    Optional query parameters:

    Response

    Client ID

    All requests to Riak <1.0 or Riak 1.0 without vnode_vclocks enabled should include the X-Riak-ClientId header, which can be any string that uniquely identifies the client, for purposes of tracing object modifications in the vector clock.

    Normal response codes:

    Typical error codes:

    404 responses are “normal” in the sense that DELETE operations are idempotent and not finding the resource has the same effect as deleting it.

    Example

    $ curl -v -X DELETE http://127.0.0.1:8098/riak/test/test2
    * About to connect() to 127.0.0.1 port 8098 (#0)
    *   Trying 127.0.0.1... connected
    * Connected to 127.0.0.1 (127.0.0.1) port 8098 (#0)
    > DELETE /riak/test/test2 HTTP/1.1
    > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
    > Host: 127.0.0.1:8098
    > Accept: */*
    >
    < HTTP/1.1 204 No Content
    < Vary: Accept-Encoding
    < Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)
    < Date: Fri, 30 Sep 2011 15:24:35 GMT
    < Content-Type: application/json
    < Content-Length: 0
    <
    * Connection #0 to host 127.0.0.1 left intact
    * Closing connection #0