Bird
0
0

What is wrong with this batch delete request?

medium📝 Debug Q7 of 15
Rest API - Batch and Bulk Operations

What is wrong with this batch delete request?
DELETE /users/ids=1,2,3

AIDs must be sent in request body
BDELETE method cannot have query parameters
CIDs should be in query string, not path
DIDs should be separated by spaces
Step-by-Step Solution
Solution:
  1. Step 1: Analyze URL structure

    The 'ids=1,2,3' is incorrectly placed in the path segment.
  2. Step 2: Correct placement for batch delete IDs

    IDs should be passed as query parameters, e.g., ?ids=1,2,3.
  3. Final Answer:

    IDs should be in query string, not path -> Option C
  4. Quick Check:

    Batch delete IDs belong in query string [OK]
Quick Trick: Place IDs in query string, not URL path [OK]
Common Mistakes:
MISTAKES
  • Putting IDs in URL path incorrectly
  • Assuming DELETE disallows query parameters
  • Using spaces instead of commas

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes