Bird
0
0

Given the nested URL /projects/7/tasks/3, what does this URL represent?

medium📝 Predict Output Q4 of 15
Rest API - URL and Resource Design
Given the nested URL /projects/7/tasks/3, what does this URL represent?
ATask with ID 7 under project 3
BProject with ID 3 under task 7
CTask with ID 3 under project 7
DAll tasks under project 3
Step-by-Step Solution
Solution:
  1. Step 1: Analyze URL structure

    The URL format is /projects/{projectId}/tasks/{taskId} meaning task 3 belongs to project 7.
  2. Step 2: Identify resource represented

    This URL points to a specific task (ID 3) nested under a specific project (ID 7).
  3. Final Answer:

    Task with ID 3 under project 7 -> Option C
  4. Quick Check:

    Nested URL resource = child under parent [OK]
Quick Trick: URL order shows parent then child resource [OK]
Common Mistakes:
  • Mixing up parent and child IDs
  • Assuming IDs are swapped
  • Confusing resource types

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes