0

I would like to know if there is a way (and of course if it is a good practice) to update a 'big' list of objects(>100 for example) through a single REST API call.

I know the REST API defines http GET,POST,PUT,DELETE

At the moment I do individuals calls to PUT with each single object.

May this create a lack of performance?

I found an article about PATCH Method HTTP , but I don't know if it is what I exactly need.

The technologies I am using are: ASP .NET WEBAPI2 AngularJS

1 Answer 1

1

HTTP-Put and Post should be the way to go. But since you are updating a collection, see if you can update the collection itself and not every entry in it. If it is a collection like "top 100 movies in 2014" this collection should have an id.

At the moment I do individuals calls to PUT with each single object. May this create a lack of performance?

Yes it does, for each request you have an overhead of information that has to be sent.

Sign up to request clarification or add additional context in comments.

2 Comments

Then, a way could be to associate an Id for the collection I retrieve from the server so I can use the PUT?
yes, but don't to this if you just updating a few entries, then multiple puts for each object could be faster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.