Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 48731 invoked from network); 19 Oct 2010 13:30:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 13:30:21 -0000 Received: (qmail 68575 invoked by uid 500); 19 Oct 2010 13:30:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 68433 invoked by uid 500); 19 Oct 2010 13:30:17 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 68420 invoked by uid 99); 19 Oct 2010 13:30:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 13:30:16 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matt.goodall@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pw0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 13:30:10 +0000 Received: by pwj7 with SMTP id 7so589160pwj.11 for ; Tue, 19 Oct 2010 06:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=O9ecMQnAE0kfnQ5qPRev7+to/e6kOaMuPF/m0aF4eKQ=; b=MkR+MuKJ0up90pj8gFjgdtWiirI/1lFCwMprwtOlEkemaqs4qd8oisFMfrVGnEZwi3 YDbeer55XRd+LYcH/kJ1p7pRjDWcBWtuUDuDOeam3tub43qSogBw2gtUn11vjLi6WbNF IZXmOsE4sZIBhOMA8Dx4RhkgWE+PGLdFFbONM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=l5cLC+Dym9eu37KluJ0MUocZE+JU+M/i+PwPzp4Ps9V5/olXqSJ99PB3Ic9CoUOuJw /fqTGwFbHQTx8owCAtAQfhkxylB9xvs8RDE2EUKaJBEce9Vlv0QF321DpuhMK2OmsORg GOI00flVSCm1tQ/Qfw0s7urziiVlk70VtTGdY= MIME-Version: 1.0 Received: by 10.142.13.20 with SMTP id 20mr4614521wfm.318.1287494989878; Tue, 19 Oct 2010 06:29:49 -0700 (PDT) Received: by 10.229.235.17 with HTTP; Tue, 19 Oct 2010 06:29:49 -0700 (PDT) In-Reply-To: <4cbd82b4.5907df0a.34c6.64c0@mx.google.com> References: <4cbd82b4.5907df0a.34c6.64c0@mx.google.com> Date: Tue, 19 Oct 2010 14:29:49 +0100 Message-ID: Subject: Re: DELETE doc without rev From: Matt Goodall To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 On 19 October 2010 12:35, Alex Ivasyuv wrote: > Thanks Matt for reply, but question still exist, is there some way to delete > doc in ONE request without mentioned revision. In your example I need to > make a GET request first. It's not possible in 1 request. As I said, you must provide the current _rev. - Matt > > Thanks, > > Sent from my HTC > > ----- Reply message ----- > From: "Matt Goodall" > Date: Tue, Oct 19, 2010 2:04 pm > Subject: DELETE doc without rev > To: > > On 19 October 2010 11:39, Alex Ivasyuv wrote: >> Hi, >> >> I would like to delete a document from DB. But for this purpose I need to >> explicitly mentioned a version, what's assume, to get >> one more call for get it. >> Is there any way to delete doc without mentioned revision of doc, e.g. >> >> $ curl -X DELETE http://localhost:5984/mydb/mydoc-123 > > You must provide the current _rev to delete a document. However, you > can get the doc's current rev from the ETag in a HEAD response. > > $ curl http://localhost:5984/mydb/mydoc-123 -I > HTTP/1.1 200 OK > Server: CouchDB/1.0.1 (Erlang OTP/R13B) > Etag: "3-825cb35de44c433bfb2df415563a19de" > Date: Tue, 19 Oct 2010 11:00:41 GMT > Content-Type: text/plain;charset=utf-8 > Content-Length: 64 > Cache-Control: must-revalidate > > - Matt > > >