0

In my domain design, one ElectronicPressKit can have multiple TechRiderItems.

In the mobile app, there is a screen where multiple TechRiderItems can be added, edited or deleted. On the click of save, these TechRiderItems should be sent to the API which will save them.

I have thought of these options for adding TechRiderItems of an ElectronicPressKit

1) On the click of save, the mobile app will send multiple calls to POST /api/electronic_press_kits/:epk_id/tech_rider_items (i.e: save one record at a time).

2) The mobile app will send one call to POST /api/electronic_press_kits/:epk_id/tech_rider_items passing multiple TechRiderItems in the payload.

3) The mobile app will send one call to PATCH /api/electronic_press_kits/:epk_id passing multiple TechRiderItems in the payload.

Which is the best way according to REST?

mridula
  • 3,203
  • 3
  • 32
  • 55
  • Possible duplicate of [REST updating multiple resources](https://stackoverflow.com/questions/11872923/rest-updating-multiple-resources) – Palpatim Jul 11 '17 at 14:08
  • As well as previous SO answers (such as https://stackoverflow.com/questions/11872923/rest-updating-multiple-resources), you may find some benefit in this article: https://templth.wordpress.com/2015/05/14/implementing-bulk-updates-within-restful-services/ – Palpatim Jul 11 '17 at 14:11

0 Answers0