Can I retrieve deleted documents?


#1

Hi, I am trying to debug an issue where the mobile app is deleting documents without me telling it to. In the admin console I can retrieve all past revisions of a document, but I want to know if a document was deleted and if so at what revision was it deleted? The admin console doesn’t show deleted flags, and the sync gateway REST API won’t return a deleted document, it just shows: {“error”:“not_found”, “reason”:“deleted”}, even if I set revs=true and open_revs=all. Is there a way to retrieve the sync gateway metadata for a deleted document?


#2

Hey @alexegli,

There is the ‘includeDeleted {get; set;}’ which Gets Queries that include deleted Documents.


#3

Thanks, but I’m looking more for an admin way to retrieve it and that’s for the couchbase lite client within the mobile application. I was thinking of some way in the admin console or the sync gateway REST API. But it’s good to know that if I need to I could do a mobile build and use that function.