From Nicola's SO answer here and my own testing it seems clear that Eve does not support conditional deletes at resource endpoints.
I know I could use a GET: "where={...}"
request to the _ids
and _etags
of the documents I would like to delete, and then send out a series of requests at each item endpoint to delete them with the If-Match
header appropriately set to each item's _etag
:
for each item:
DELETE: http://localhost:5000/items/<item._id>
...but I would like to avoid sending out multiple HTTP requests if possible.
One solution may be predefined database filters, but these would be static filters where I'd like to dynamically filter deletion depending on some URL parameters. Pre-event hooks may be the solution I'm seeking.
Does Eve support bulk deletion? And if not, what is the recommended way to extend Eve's functionality to provide conditional and/or bulk deletes?