couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: post design documents
Date Wed, 03 Jun 2009 19:05:39 GMT
On Tue, Jun 02, 2009 at 05:28:37PM +0100, Michael Stillwell wrote:
>> Do you have to DELETE the URI then re-PUT it or is there a mechanism  
>> to update/version the design document?
>
> If you pass along the _rev of the *previous* version it will update as  
> you expect.  See:
>
> http://wiki.apache.org/couchdb/HTTP_Document_API
>
> "To update an existing document, you also issue a PUT request. In this  
> case, the JSON body must contain a _rev property, which lets CouchDB  
> know which revision the edits are based on."
>
> Otherwise, if retrieving _rev is awkward, you can DELETE and re-add.

I don't think this helps, because to DELETE a document you also need to
provide the _rev, don't you?

Mime
View raw message