In my domain design, one ElectronicPressKit
can have multiple TechRiderItem
s.
In the mobile app, there is a screen where multiple TechRiderItem
s can be added, edited or deleted. On the click of save, these TechRiderItem
s should be sent to the API which will save them.
I have thought of these options for adding TechRiderItem
s 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 TechRiderItem
s in the payload.
3) The mobile app will send one call to PATCH
/api/electronic_press_kits/:epk_id
passing multiple TechRiderItem
s in the payload.
Which is the best way according to REST
?