Bulk delete via REST API in CBL


#1

I notice there’s no explicit bulk delete endpoint in the CBL rest API. Is it possible to use POST / _bulk_docs to achieve the same thing?


#2

Can you try creating a new revision in bulk docs with the property _deleted: true. It should then delete it. That’s not mentioned in the endpoint description so I created a new issue https://github.com/couchbaselabs/couchbase-mobile-portal/issues/474

James


#3

Actually it’s mentioned in this paragraph if that’s what you’re referring to http://developer.couchbase.com/documentation/mobile/1.3/develop/references/couchbase-lite/rest-api/index.html#operation---db--_bulk_docs-post

James


#4

Perfect, thank you. Is there also a bulk_purge? Or do you need to call compact?


#5

Cool! I don’t think there’s a bulk purge operation so calling /{db}/compact would be the way to do it.

James