odata-basics-handsonsapdev icon indicating copy to clipboard operation
odata-basics-handsonsapdev copied to clipboard

How to create multiple entities using HTTP POST in OData V2

Open mainakaich opened this issue 5 months ago • 0 comments

Hi @qmacro ,

Suppose in TripIn OData V2 service, I want to create 2 person entities in entityset People.

Now, instead of sending 2 separate HTTP post request each containing the person details in request body, can I send both the person details in the same request body as an array? If I send as an array, I can just send one HTTP POST to create 2 person entities. But currently the OData service doesn't accept it when I pass an array of persons to the OData service.

So, wanted to understand is it working as expected or I am doing something wrong here? If it accepts only one entity creation at a time, then shall I collect them in a batch request and send it?

Thanks, Mainak

mainakaich avatar Jun 23 '25 10:06 mainakaich