Deleting a document in Couchbase server admin console

220 views
Skip to first unread message

parvez....@decurtis.com

unread,
May 31, 2017, 10:33:46 AM5/31/17
to Couchbase Mobile
if we delete a document by pressing Delete button against it in Couchbase admin web console. Will this delete action gets propagated to all connected clients which is using Couchbase lite? My observation is that if I delete a document on web console then this change do not get propagated to the client (ios application using Couchbase Lite framework). Is this an issue or there is something missing that is responsible for this ? My purpose here is to delete some documents from bucket instead of flushing the bucket and re-starting the sync gateway.

Traun Leyden

unread,
May 31, 2017, 2:08:39 PM5/31/17
to Couchbase Mobile

You actually shouldn't ever edit a Couchbase Server document directly if it's in a bucket that is being managed by Sync Gateway.

The upcoming release of Sync Gateway 1.5 will allow that, but in the current Sync Gateway 1.4 release the only way to safely use that is via Bucket Shadowing, which is in the process of being deprecated.

Jens Alfke

unread,
May 31, 2017, 3:35:32 PM5/31/17
to mobile-c...@googlegroups.com
You’ll need to send a DELETE to the doc’s URL using the SG REST API. This deletion leaves behind a ‘tombstone’ revision that gets propagated to clients.

—Jens

Parvez Qureshi

unread,
May 31, 2017, 3:51:31 PM5/31/17
to mobile-c...@googlegroups.com
Jens
Can you give a simple example of SG rest api to delete a document?


From: mobile-c...@googlegroups.com <mobile-c...@googlegroups.com> on behalf of Jens Alfke <je...@couchbase.com>
Sent: Thursday, June 1, 2017 1:05:25 AM
To: mobile-c...@googlegroups.com
Subject: Re: Deleting a document in Couchbase server admin console
 
You’ll need to send a DELETE to the doc’s URL using the SG REST API. This deletion leaves behind a ‘tombstone’ revision that gets propagated to clients.

—Jens

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/OEtg-KG_rlw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/90CD6D3C-D7FD-4463-ACE9-F87D0490354E%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Traun Leyden

unread,
May 31, 2017, 4:07:18 PM5/31/17
to mobile-c...@googlegroups.com

On Wed, May 31, 2017 at 12:51 PM, Parvez Qureshi <parvez....@decurtis.com> wrote:
Jens
Can you give a simple example of SG rest api to delete a document?



Sent: Thursday, June 1, 2017 1:05:25 AM

Subject: Re: Deleting a document in Couchbase server admin console
You’ll need to send a DELETE to the doc’s URL using the SG REST API. This deletion leaves behind a ‘tombstone’ revision that gets propagated to clients.

—Jens

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/OEtg-KG_rlw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchbase+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/CO2PR05MB24723EA00014E983A2A0E73BFBF10%40CO2PR05MB2472.namprd05.prod.outlook.com.

Jens Alfke

unread,
May 31, 2017, 8:05:06 PM5/31/17
to mobile-c...@googlegroups.com

On May 31, 2017, at 12:51 PM, Parvez Qureshi <parvez....@decurtis.com> wrote:

Can you give a simple example of SG rest api to delete a document?

(using httpie, which is much better than curl for this sort of stuff)

http DELETE 'localhost:4985/db/somedoc?rev=2-ffffffff’

or

curl -X DELETE 'localhost:4985/db/somedoc?rev=2-ffffffff’


—Jens
Reply all
Reply to author
Forward
0 new messages