Bird
0
0

What resource does the path /companies/8/departments/4/employees/15 represent?

medium📝 Predict Output Q5 of 15
Rest API - URL and Resource Design
What resource does the path /companies/8/departments/4/employees/15 represent?
AAll employees in company 8
BDepartment 4 of company 8
CCompany 8 details
DEmployee 15 in department 4 of company 8
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the path hierarchy

    Company 8 is the top-level resource, department 4 is nested inside it, employee 15 is nested inside department 4.
  2. Step 2: Identify the specific resource

    The path points to a specific employee with ID 15 inside department 4 of company 8.
  3. Final Answer:

    Employee 15 in department 4 of company 8 -> Option D
  4. Quick Check:

    Full path with IDs = specific nested resource [OK]
Quick Trick: IDs in order show exact nested resource [OK]
Common Mistakes:
  • Ignoring nested resource IDs
  • Assuming path ends at department
  • Confusing company and department levels

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes