8 ms·
A bulk deletion isn't defined as part of their "Standard Methods" .. For stuff that doesn't fit the standard methods, they have this page on custom methods: htt
by veesahni 10y ago
A bulk deletion isn't defined as part of their "Standard Methods" .. For stuff that doesn't fit the standard methods, they have this page on custom methods: https://cloud.google.com/apis/design/custom_methods https://cloud.google.com/apis/design/custom_methods
That said, I'd implement a bulk deletion in one of three ways:
:::: ONE
DELETE /thingies/id1,id2,id3
When all is ok, the response is a 200. However, if one of the deletions fail, how you handle the response is more complicated.
:::: TWO
POST /thingies/bulk_delete
and have your ID's listed in the body. Still same problem with handling the response.
:::: THREE
POST /bulk
Instead of implementing a bulk deletion at all, think about how you can implement "bulk requests" as a higher level feature of the API.
So you can transport a bunch of delete's as part of a single HTTP request, and get back a bunch of response codes packaged into a single response.
- rodionos 10y agoPOST /thingies/bulk_delete Exactly. That's the approach we've taken. It has worked better for us than sending a delete action via PATCH.