惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
GbyAI
GbyAI
月光博客
月光博客
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
F
Full Disclosure
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
博客园 - Franky
V
V2EX
Recorded Future
Recorded Future
WordPress大学
WordPress大学
小众软件
小众软件
Webroot Blog
Webroot Blog
雷峰网
雷峰网
Vercel News
Vercel News
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
W
WeLiveSecurity
S
Schneier on Security
博客园 - 三生石上(FineUI控件)
K
Kaspersky official blog
F
Fortinet All Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Spread Privacy
Spread Privacy
博客园 - 叶小钗
罗磊的独立博客
D
Docker
Forbes - Security
Forbes - Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Register - Security
The Register - Security
A
About on SuperTechFans
B
Blog RSS Feed
I
InfoQ
T
Tailwind CSS Blog
G
Google Developers Blog
H
Help Net Security
V
Vulnerabilities – Threatpost
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
M
MIT News - Artificial intelligence
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
MyScale Blog
MyScale Blog
Latest news
Latest news

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How to Version APIs Without Breaking Production
OutworkTech · 2026-06-01 · via DEV Community

API versioning is one of those topics every backend engineer understands in theory and gets wrong in practice.

Not because it's technically complex. Because the decisions you make at v1 follow you all the way to v5 — and most teams don't think about that until something breaks in production at 2 AM.

This is a practical breakdown of how to version APIs the right way, before you're forced to.


Why API Versioning Breaks Things in the First Place

The core problem isn't versioning itself. It's that APIs are contracts.

When you expose an endpoint, every consumer — mobile app, third-party integration, internal service — builds against that contract. The moment you change a field name, remove a parameter, or alter a response structure, you've broken that contract for someone.

The instinct is to just "update the docs and notify people." That works exactly once, on a small team, with no external consumers.

At scale, it fails every time.


The Three Versioning Strategies (And When to Use Each)

1. URI Versioning

The most common approach. Version lives in the URL path.

When it works:

  • Public APIs with external consumers
  • APIs where clients need to explicitly opt into new behavior
  • Teams that want maximum clarity in logs and routing

The real tradeoff:
URI versioning is explicit — which is good — but it encourages parallel code maintenance. Running /v1 and /v2 simultaneously means two codebases, two sets of tests, two surfaces for bugs. Most teams underestimate the maintenance cost of this until v3 ships.


2. Header Versioning

Version is passed in the Accept or a custom header like API-Version: 2.

When it works:

  • Internal APIs where you control all consumers
  • Teams that want clean URLs without version pollution
  • APIs consumed primarily by server-to-server clients (not browsers)

The real tradeoff:
Header versioning is cleaner architecturally but harder to test manually and harder to cache at the CDN/proxy layer. Most teams skip this because it adds friction to client-side debugging.


3. Query Parameter Versioning

Honestly? It mostly doesn't work. It's the lazy default — easy to implement, easy to forget, easy to misuse. Avoid it for anything serious.

The only valid use case is a transitional API where you need quick rollback capability and the consumer base is entirely internal.


The Breaking vs. Non-Breaking Change Problem

Before you create a new version, ask the right question: does this change actually require one?

Most teams version too aggressively. A new version for every change is versioning theater — it looks disciplined but creates unnecessary complexity.

Changes that do NOT require a new version:

  • Adding new optional fields to a response
  • Adding new optional query parameters
  • Adding new endpoints
  • Deprecating (not removing) fields with a clear sunset date

Changes that require a new version:

  • Removing or renaming existing fields
  • Changing field data types (string → integer, object → array)
  • Altering authentication flows
  • Restructuring nested response objects
  • Changing error response formats

The rule of thumb: if a consumer can ignore the change and keep working, it's non-breaking. If they have to update their code to not break, it's breaking.


A Versioning Lifecycle That Actually Works

Most teams think about versioning as a naming problem. It's really a lifecycle management problem.

Here's a framework that holds up in production:

Phase 1 — Launch
Ship v1. Document it properly. Treat it like a public contract from day one, even if it's internal.

Phase 2 — Iterate Without Breaking
Add features as non-breaking changes. New optional fields. New endpoints. Additive-only changes.

Phase 3 — Announce Deprecation Early
When a breaking change becomes unavoidable, release v2 and mark affected v1 endpoints as deprecated. Set a sunset date — minimum 6 months for external APIs, 3 months for internal.

Add a Deprecation header to deprecated responses:
Phase 4 — Enforce Migration
Before sunset, send direct communication to consumers still hitting deprecated endpoints. Most teams skip this step. Don't — it's what separates a clean migration from a production incident.

Phase 5 — Sunset
Return 410 Gone instead of 404 Not Found for removed endpoints. The distinction matters — 410 tells consumers this was intentional and permanent, not a routing error.


Monorepo vs. Separate Codebases for API Versions

Approach A — Shared core, versioned adapters
Cleanest in practice. Business logic lives once. Versioning only affects the serialization/deserialization layer. When v1 is sunset, delete the adapter directory.

Approach B — Full version isolation
Easier to reason about in the short term. Becomes a maintenance nightmare by v3 when a security patch needs to be applied in three places simultaneously.

For most SaaS products, Approach A is the right default. Approach B only makes sense when versions have fundamentally different infrastructure requirements.


Practical Implementation Checklist

Before shipping any version change, run through this:

  • [ ] Is the change actually breaking? (If not, skip versioning)
  • [ ] Is v(n-1) deprecated with a documented sunset date?
  • [ ] Are Deprecation and Sunset headers returned on deprecated routes?
  • [ ] Is the new version documented before it ships, not after?
  • [ ] Are consumers using deprecated endpoints identified and notified?
  • [ ] Does your monitoring track requests by API version?
  • [ ] Is 410 Gone configured for sunset endpoints?
  • [ ] Are your SDK/client libraries updated before the new version goes live?

If any of these is unchecked when you push, you're setting up a future incident.


The Mindset Shift That Matters

Most teams treat API versioning as a technical task — pick a strategy, implement it, move on.

The teams that do it well treat it as a communication discipline.

Every version is a message to your consumers: "we changed something that matters, here's what, here's when the old thing goes away, here's how to migrate."

Get that communication loop right and the technical implementation almost doesn't matter. Get it wrong and even the cleanest URI versioning strategy will still cause production fires.


OutworkTech builds and scales backend systems, APIs, and SaaS infrastructure for companies that need engineering depth without the overhead. If your API architecture is becoming a bottleneck — let's talk.