Bird
Raised Fist0

If an API removes a field in version 2 that existed in version 1, what will happen if a client sends data with that field to /v1 endpoint?

medium📝 Predict Output Q5 of Q15
Rest API - Versioning Strategies
If an API removes a field in version 2 that existed in version 1, what will happen if a client sends data with that field to /v1 endpoint?
AThe request succeeds because /v1 still supports the field
BThe request fails because the field is removed in /v2
CThe server ignores the field and returns an error
DThe client is forced to upgrade to /v2
Step-by-Step Solution
Solution:
  1. Step 1: Recognize version independence

    Each version handles its own schema; /v1 still accepts the field even if /v2 removed it.
  2. Step 2: Evaluate client request to /v1

    Sending the field to /v1 works as expected because /v1's rules apply.
  3. Final Answer:

    The request succeeds because /v1 still supports the field -> Option A
  4. Quick Check:

    Old version accepts old fields = B [OK]
Quick Trick: Old versions keep old fields even if removed later [OK]
Common Mistakes:
MISTAKES
  • Assuming removal in new version breaks old version
  • Expecting errors on old version for deprecated fields
  • Thinking server forces upgrades

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes