Bird
0
0

Identify the error in this REST API URL for accessing order 789: /orders/ 789

medium📝 Debug Q14 of 15
Rest API - URL and Resource Design
Identify the error in this REST API URL for accessing order 789: /orders/ 789
AThe resource identifier should be before the resource name
BThere should be no slash between resource name and ID
CThe ID should be part of the path, not separate
DThe URL is correct as is
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the URL structure

    The URL shows /orders/ and then 789 separately, which suggests the ID is not part of the path.
  2. Step 2: Understand correct resource ID placement

    The ID should be directly after the resource name in the same path segment, like /orders/789.
  3. Final Answer:

    The ID should be part of the path, not separate -> Option C
  4. Quick Check:

    Resource ID must be in the path segment [OK]
Quick Trick: Resource ID must be in the same path segment [OK]
Common Mistakes:
  • Placing ID outside the URL path
  • Removing the slash between resource and ID
  • Thinking resource ID comes before resource name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes