2

I'm using python eve 0.62 and I try to delete multiple items from a collections:

this is what im doing:

  http://0.0.0.0:8000/api/Images?where={"_id": {"$in":["a","b"]}}

where the request method is:

 Request Method:DELETE

Result:

This delete all the resource in the collection :( , not only the id in the list

My question is:

As I read from the python eve documentation, Delete can be used as Collection:

Delete DELETE Collection/Document

http://python-eve.org/features.html

How i have do do if I want to delete few resources by id?

ndmeiri
  • 4,979
  • 12
  • 37
  • 45

1 Answers1

1

DELETE performed at the resource endpoint is currently designed to wipe all the documents. This is also the reason why it is usually a smart move to disable deletes at the resource endpoint. You delete a single document by hitting its own endpoint. Rinse and repeat for multiple documents.

Nicola Iarocci
  • 6,606
  • 1
  • 20
  • 33