Answer the question
In order to leave comments, you need to log in
How should updating collections over REST work?
Hello.
The entity bundle needs to be updated. Sending an array of JSON objects to the server. Question in the following:
What should come in a case when one of records is incorrect? Since each object is processed by a loop, is it necessary to interrupt this loop and return an Exception, or is it necessary instead of Exception to push a construction like this into the array with the response: {objectId : 123, errors : {'errorField' : 'errorName'}} and update the objects that passed validation?
Answer the question
In order to leave comments, you need to log in
For good, if something went wrong, then the entire request falls, the entire transaction is rolled back and you have to send everything again. Moreover, it will not work to partially process the collection, you can, of course, list IDs separated by commas, but this is not very convenient. Everything else is already beyond the scope of the REST concept, and then JSON RPC comes to your aid, and here you yourself regulate how and what, you just pull the POST request and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question