Bird
0
0

What resource does the URL /users/22/orders/1001 identify?

medium📝 Predict Output Q5 of 15
Rest API - URL and Resource Design
What resource does the URL /users/22/orders/1001 identify?
AUser with ID 22
BAll orders for user 1001
COrder with ID 1001 for user 22
DOrder with ID 22
Step-by-Step Solution
Solution:
  1. Step 1: Break down the URL path

    The URL shows a user resource with ID 22, then an order resource with ID 1001 nested inside.
  2. Step 2: Determine the resource identified

    The full URL points to the order with ID 1001 belonging to user 22.
  3. Final Answer:

    Order with ID 1001 for user 22 -> Option C
  4. Quick Check:

    Nested resource URL points to child resource [OK]
Quick Trick: Nested IDs mean child resource under parent [OK]
Common Mistakes:
  • Mixing up which ID belongs to which resource
  • Assuming URL points to user only
  • Ignoring nested resource meaning

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes