Bird
0
0

What is the correct endpoint to update a single user with ID 123?

medium📝 Predict Output Q5 of 15
Rest API - URL and Resource Design
What is the correct endpoint to update a single user with ID 123?
APUT /users/123
BPUT /user/123
CPUT /users
DPUT /user
Step-by-Step Solution
Solution:
  1. Step 1: Identify update endpoint pattern

    Updating a single resource requires specifying the resource collection and the resource ID.
  2. Step 2: Use plural resource name with ID

    The correct endpoint is PUT /users/123 to update user with ID 123.
  3. Final Answer:

    PUT /users/123 -> Option A
  4. Quick Check:

    Update single resource = B [OK]
Quick Trick: Use plural resource plus ID for update endpoints [OK]
Common Mistakes:
  • Using singular resource without ID
  • Omitting ID for single resource update
  • Using collection endpoint without ID

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes