Bird
0
0

If a REST API response includes: Link: ; rel="self", what does the 'self' relation indicate?

medium📝 Predict Output Q5 of 15
Rest API - HATEOAS and Linking
If a REST API response includes: Link: ; rel="self", what does the 'self' relation indicate?
AIt points to the next resource in a list
BIt points to the current resource URL
CIt points to a related resource
DIt points to the parent resource
Step-by-Step Solution
Solution:
  1. Step 1: Understand 'self' link relation meaning

    'self' indicates the URL of the current resource being returned.
  2. Step 2: Differentiate from other relations

    Other relations like 'parent' or 'next' point elsewhere, but 'self' is the resource itself.
  3. Final Answer:

    It points to the current resource URL -> Option B
  4. Quick Check:

    'self' relation = current resource URL [OK]
Quick Trick: 'self' link means current resource URL [OK]
Common Mistakes:
  • Confusing 'self' with 'parent' or 'next'
  • Assuming 'self' points to related resources
  • Ignoring 'self' link in responses

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes