📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How do you evolve an API without breaking existing clients, and when do you introduce a new version?

Mid-Level Theory Intermediate

🎯 Key points

  • Additive changes first; tolerant readers ignore unknown fields
  • Semantic versioning: only breaking changes get a new major version
  • Deprecate with OpenAPI flags plus Deprecation and Sunset headers
  • Communicate: changelog, developer portal, direct partner contact
  • Measure usage of deprecated fields before removing
  • Feature flags or gradual rollout for behaviour changes
  • Asp.Versioning; at most two majors live, with a published end date

⏱ 30-second answer

Prefer additive, backwards-compatible changes: new optional request fields, new response fields, new endpoints, and clients that ignore unknown fields (tolerant readers). Think in semantic versioning terms: additive changes are minor and need no new version; only breaking changes justify a new major version.

For removals or renames: add the new field, mark the old one deprecated in OpenAPI and send Deprecation and Sunset headers, tell consumers (changelog, release notes, developer portal, direct contact for partners), track usage of the old field in telemetry, and remove it only when usage is gone. Risky behaviour changes can roll out behind a feature flag per client.

Introduce a new major version (Asp.Versioning, URL segment or header) only when a change cannot be additive, such as a different resource model. Run at most two majors side by side with a published end date, so versions do not fragment.

🔍 What the interviewer is checking

Checks API evolution rules, deprecation and versioning strategy.

↩ Usually asked after

More in SPA Integration

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me