Bird
0
0

Identify the error in this nested resource URL: /users//orders/5

medium📝 Debug Q6 of 15
Rest API - URL and Resource Design
Identify the error in this nested resource URL: /users//orders/5
AExtra slash at the end
BOrders should come before users
CMissing user ID between slashes
DOrders ID should be first
Step-by-Step Solution
Solution:
  1. Step 1: Check URL structure

    The URL has two slashes with nothing between: /users//orders/5.
  2. Step 2: Identify missing part

    The user ID is missing between the slashes, which is required to specify the parent resource.
  3. Final Answer:

    Missing user ID between slashes -> Option C
  4. Quick Check:

    Nested URL must include parent ID [OK]
Quick Trick: Always include parent resource ID in nested URLs [OK]
Common Mistakes:
  • Ignoring missing IDs
  • Thinking order of resources is wrong
  • Assuming trailing slash is error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes