Bird
0
0

You want to update 100 user records via a REST API. Which approach best reduces round trips and improves efficiency?

hard📝 Application Q15 of 15
Rest API - Batch and Bulk Operations
You want to update 100 user records via a REST API. Which approach best reduces round trips and improves efficiency?
ASend a single batch request containing all 100 updates
BSend 100 separate PUT requests, one per user
CSend one PUT request with only the first user update
DSend 10 batch requests each with 5 updates
Step-by-Step Solution
Solution:
  1. Step 1: Compare sending many requests vs batch

    Sending 100 separate requests causes 100 round trips, which is slow and inefficient.
  2. Step 2: Evaluate batch request benefits

    A single batch request with all 100 updates reduces round trips to 1, saving time and network use.
  3. Final Answer:

    Send a single batch request containing all 100 updates -> Option A
  4. Quick Check:

    One batch request for many updates = Send a single batch request containing all 100 updates [OK]
Quick Trick: One batch request beats many single requests [OK]
Common Mistakes:
MISTAKES
  • Sending many separate requests wastes round trips
  • Sending partial updates misses data
  • Splitting into many small batches adds overhead

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes