Bird
0
0

Given the URL /products/45/reviews, what does this URL most likely represent?

medium📝 Predict Output Q13 of 15
Rest API - URL and Resource Design
Given the URL /products/45/reviews, what does this URL most likely represent?
AAll products and their reviews
BProduct number 45's details only
CReviews for the product with ID 45
DA list of all reviews without product info
Step-by-Step Solution
Solution:
  1. Step 1: Break down the URL parts

    /products indicates the main resource, 45 is the product ID, and /reviews is a sub-resource related to that product.
  2. Step 2: Interpret the meaning

    The URL points to reviews specifically for product 45, not all products or unrelated reviews.
  3. Final Answer:

    Reviews for the product with ID 45 -> Option C
  4. Quick Check:

    Sub-resource after ID means related data = C [OK]
Quick Trick: Sub-resource after ID means related data for that item [OK]
Common Mistakes:
MISTAKES
  • Thinking it lists all products
  • Confusing product details with reviews
  • Ignoring the product ID in URL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes