Delete multiple records using REST

前端 未结 5 541
情书的邮戳
情书的邮戳 2020-12-04 08:20

What is the REST-ful way of deleting multiple items?

My use case is that I have a Backbone Collection wherein I need to be able to delete multiple items at once. The

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 08:52

    If GET /records?filteringCriteria returns array of all records matching the criteria, then DELETE /records?filteringCriteria could delete all such records.

    In this case the answer to your question would be DELETE /records?id=1&id=2&id=3.

提交回复
热议问题