POST collection of entities


I use specification in big production project, and possibility to POST an array of entities would be very useful.
Especially since PATCH/PUT collection in relationships already allowed.

I don’t see any problems in POST collection of entities with generated UUIDs.
I believe that this should be added to the next version of specification.

What do you think about this?


I discussed this in a “how to post” here.

But from the specification standpoint, the bounds of desired or expected behavior during a bulk transaction makes it a very risky proposition to include in an add only spec. The concern is a bulk operation of the same type, and a transactional operation of multiple types would have very different concerns on specific endpoints. However, both of these would have the need to define a way to respond to failed nodes within the operation. A bulk load might want a report of specific items which failed, while a transaction would require all proceeding operations to be undone, and would require implementers and designers to understand and more importantly support the concepts of transactional isolation, which is not a base property of a restful service.

Under the mantra of “be liberal in what you accept and conservative in what you send”, the current method allows for enough flexibility where a bulk operator can define a resource like the one I linked, as well as implement transaction isolation for heterogenous bulk operations.

POSTing related data
Patch related resource