Bird
Raised Fist0

You want to add a new optional feature to your API without breaking existing clients. Which versioning strategy best supports this?

hard🚀 Application Q15 of Q15
Rest API - Versioning Strategies
You want to add a new optional feature to your API without breaking existing clients. Which versioning strategy best supports this?
ACreate a new version (e.g., /api/v2) with the feature, keep /api/v1 unchanged.
BAdd the feature directly to /api/v1 and remove old features.
CChange the API URL to /api/users without version and add the feature.
DForce all clients to update to the new feature immediately.
Step-by-Step Solution
Solution:
  1. Step 1: Identify safe way to add features

    Adding a new version keeps old clients working and adds new features safely.
  2. Step 2: Evaluate options

    Create a new version (e.g., /api/v2) with the feature, keep /api/v1 unchanged. creates /api/v2 with new feature and keeps /api/v1 stable, preventing breakage.
  3. Final Answer:

    Create a new version (e.g., /api/v2) with the feature, keep /api/v1 unchanged. -> Option A
  4. Quick Check:

    New version for new features = C [OK]
Quick Trick: Add features in new versions, keep old stable [OK]
Common Mistakes:
MISTAKES
  • Changing old versions directly
  • Removing old features immediately
  • Not using versioning at all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes