I'm currently working on a restful-API for an existing product, and come to a quite tricky problem: The Existing application supports several mass actions, i.e. mass-delete or grids for mass-setting certain properties of records. Using the usual restful-pattern, i`d have to send a api-call for each record, (DELETE or UPDATE), but with large amounts of records this will obviously be quite slow. so i was wondering, if someone already found a good solution for this, especially regarding usage with existing restful-technology (like Extjs restful store). So far if come up with these possible solutions:
Any thoughts?
RESTful things act on Resources, so perhaps have the URI refer to a collection (even describing the collection if needed), and post a delete to that URI. In RESTful terms, you're passing the collection resource in a deleted state to its URI. So:
Delete -> stub/collections/ids=141,159,235,900
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With