Bird
0
0

Given this HTTP Accept header:

medium📝 Predict Output Q13 of 15
Rest API - Versioning Strategies
Given this HTTP Accept header:
Accept: application/vnd.example.v2+json
What version of the API is the client requesting?
AVersion 3
BVersion 1
CVersion 2
DNo version specified
Step-by-Step Solution
Solution:
  1. Step 1: Parse the media type string

    The media type is application/vnd.example.v2+json. The .v2 part indicates version 2.
  2. Step 2: Confirm version number meaning

    The v2 suffix is a common pattern to specify API version 2 in media type versioning.
  3. Final Answer:

    Version 2 -> Option C
  4. Quick Check:

    v2 in media type means version 2 [OK]
Quick Trick: Look for .vX in media type for version number [OK]
Common Mistakes:
  • Ignoring the .v2 and picking version 1
  • Confusing +json suffix as version
  • Assuming no version if not in URL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes