Saving multiple data objects with one request?

I have to save multiple data objects at a time, and it seems kind of expensive to just loop through 10+ objects and save them one at a time. Is bulk inserting objects supported?

Hi Liro,

You can create a custom hosted service using API Engine, pass the collection of objects there and save them one by one on the server-side. This way the overall time for the operation will be much faster.

Regards,
Mark

Hi Mark,

I’m interested in this feature, but I’d like to know how set the ownerID of these objects to be saved, as the user calling the service.

I’ve asked in other thread something that might be related: http://support.backendless.com/t/server-code-error-in-backendless-sdk-when-saving-new-entity#comment-14687

Could this be achieved using a custom EventHandler? Or it needs the API Engine to be done?

Thanks!

jdev,

Please submit a new topic so each support issue is handled and tracked separately.

Regards,
Mark

Mark Piller,

Hello, how can I POST multiple objects in REST console? Could you please correct my JSON if I’m wrong?
Request body:

[ 
{
    "url": "https://api.backendless.com/7A73D65F-1E36-0B5F-FF78-431D03CB6800/v1/files/media/maps/adventure/adventure/GTA+San+Andreas/GTASanAndreas_2.png"
  },
  {
    "url": "https://api.backendless.com/7A73D65F-1E36-0B5F-FF78-431D03CB6800/v1/files/media/maps/adventure/adventure/GTA+San+Andreas/GTASanAndreas_3.png"
  }
]

Multiple objects can be sent in a single API request only as a collection of objects belonging to a parent. See the examples at:

https://backendless.com/documentation/data/rest/data_relations_save_update.htm