If I'm not mistaken, that's exactly what Mark is asking about.

Yes, you can GET and PUT documents as a copy mechanism. That's all the
replicator does, after all.

B.

On 25 March 2013 21:46, Jens Alfke <[email protected]> wrote:
>
> On Mar 25, 2013, at 2:35 PM, Mark Hahn 
> <[email protected]<mailto:[email protected]>> wrote:
>
> I have a database with a zillion docs that I need to empty.  I just want
> the design docs left behind.
>
> If you delete the docs, you’ll leave behind tombstone revisions, so the 
> database won’t strictly speaking be empty (unless you call purge afterwards.)
>
>  I googled and saw some techniques that
> require writing code.
> Could I just GET the docs with curl and then PUT them?
>
> The fastest way is probably
> 1. Create a new database
> 2. GET the design docs, PUT them to the new database
> 3. Delete the old database
> However you’ll be left with a database with a different name. I don’t think 
> there is any API to rename a database.
>
> —Jens

Reply via email to