Who Manages API Versioning to Prevent Breaking Changes?
Who owns API versioning in DevOps: roles, breaking changes, URI vs header, SemVer, CI checks, Deprecation and Sunset headers, and Kubernetes policy.
The team that owns an API owns its versioning. A product or API owner decides what counts as a breaking change, the developing team ships and supports each version, platform or DevOps engineers automate checks in CI/CD and the gateway, and a small governance group sets the rules. Without a named owner, nobody retires old versions.
Key takeaways
- A breaking change is any change that can make a correctly written existing client fail: removing or renaming a field, changing a type, tightening validation, or changing error behavior.
- Ownership must be explicit. The owning team decides, DevOps automates the checks, and a governance group sets shared rules so each team does not invent its own.
- Expose only the major version in the URL or header (Google's API guidance does this:
v1, notv1.4.2). Use semantic versioning for libraries and for the full release number of the service. - Catch breaking changes before merge by comparing the new API description against the released one in CI.
- Announce retirement in documentation and in responses. RFC 9745 defines a
Deprecationheader, and theSunsetheader from RFC 8594 states when a resource stops responding. - Kubernetes shows what a mature policy looks like: written deprecation rules, side-by-side versions and measured support periods.
What API versioning is, and what counts as breaking
API versioning is the practice of giving each incompatible shape of an API its own identifier so that existing clients keep working while new clients adopt the new shape. It lets a provider change quickly without forcing every consumer to change on the same day.
Not every change needs a new version. Compatible changes can ship in place. Incompatible ones cannot. Use this as a working checklist.
| Change | Usually compatible? | Why |
|---|---|---|
| Add an optional request field | Yes | Existing clients do not send it |
| Add a new response field | Yes, if clients ignore unknown fields | Strict parsers can still fail, so state the rule in your contract |
| Add a new endpoint | Yes | No existing call changes |
| Remove or rename a field | No | Clients that read it break |
| Change a field type or format | No | Parsers and validators break |
| Make an optional field required | No | Old requests now fail |
| Change status codes or error shape | No | Client error handling breaks |
| Change meaning of an existing value | No | Silent wrong behavior, the worst kind |
The "yes, if clients ignore unknown fields" row is a policy decision. Publish it as part of your API contract so consumers know to write tolerant readers.
Who manages API versioning
No single job title is responsible everywhere. In healthy organizations the work is split into four roles, and each has a clear decision.
| Role | Decides or does | Typical output |
|---|---|---|
| API owner (product or service owner) | What is a breaking change, when to cut a new major version, when old ones retire | Roadmap, deprecation notice, sunset date |
| Development team | Implements versions, keeps old ones working, writes migration notes | Code, API description, changelog |
| DevOps or platform engineers | Automates checks, routing, rollout and monitoring of versions | CI jobs, gateway config, dashboards |
| Governance or API guild | Sets shared rules: naming, version scheme, deprecation period, review process | Style guide, review checklist |
Two failure patterns are common. In the first, platform engineers are expected to "handle versioning" but have no authority over the contract, so they can only route traffic. In the second, every team picks its own scheme and consumers face five conventions. Name an owner per API, write the shared rules once, and let DevOps enforce them with automation. For the pipeline side, our post on what GitOps is and how it enhances infrastructure automation shows how the same review-and-merge flow applies to configuration.
Versioning strategies compared
| Strategy | Example | Strength | Weakness |
|---|---|---|---|
| URI path | /v1/orders | Visible, easy to route and cache, easy to test in a browser | Whole-surface bump; URLs change between versions |
| Header | A custom header or media type naming the version | Stable URLs, finer control per resource | Harder to test by hand; proxies and caches must vary on the header |
| Query parameter | /orders?version=2 | Simple to add | Easy to omit; mixes version with filtering |
| Date or release based | Pin a client to the version it was created against | Small changes ship often | Provider must keep many behaviors alive |
Whichever you choose, apply it everywhere. The best scheme is the one every team uses the same way.
Where semantic versioning fits
Semantic versioning (SemVer) uses MAJOR.MINOR.PATCH. According to semver.org, MAJOR increases for incompatible API changes, MINOR for backward-compatible functionality, and PATCH for backward-compatible bug fixes. Software must declare a public API, a released version must never change, and marking functionality as deprecated requires a MINOR release. Before removing deprecated functionality in a new MAJOR release, the spec recommends that at least one MINOR release carries the deprecation.
SemVer maps cleanly onto client libraries and SDKs. For web APIs, expose only the major part. Google's API guidance (AIP-185) puts the major version in the URI path and says minor and patch numbers must not be exposed, so clients get compatible improvements without migrating. Keep the full MAJOR.MINOR.PATCH in the service release number and the API description (the info.version field in OpenAPI), where it helps humans and tooling.
How DevOps puts versioning into the pipeline
- Keep the contract in the repository. Store the API description (for example an OpenAPI file) next to the code and review changes to it like any other change.
- Diff on every pull request. Compare the new description against the last released one and fail the build when it finds a breaking change without a new major version. Pick any OpenAPI diff tool you trust and run it as a CI step.
- Run consumer contract tests. Consumers publish the requests and responses they rely on, and the provider's build replays them. This catches breaks that the description does not show, such as changed semantics.
- Route versions at the gateway. The gateway sends
/v1and/v2to different deployments, so each version can scale and roll back separately. See how API gateways simplify microservice deployment and their role in securing microservices. - Roll out gradually. Release a new version to a small share of traffic first, as described in how canary releases reduce risk.
- Measure usage per version. Log the version on every request. You cannot retire
v1until you know who still calls it. - Enforce rules as code. Naming, required headers and review gates can be checked automatically. Our guide to policy-as-code tools like OPA explains the idea.
A minimal gateway-style routing rule shows the principle. This is generic illustration, not tied to one product:
routes:
- match: /v1/orders
backend: orders-v1
- match: /v2/orders
backend: orders-v2
Deprecation without surprising anyone
Retiring a version is a communication task as much as a technical one. A workable sequence:
- Announce the deprecation in the changelog, the developer portal and by direct message to known consumers.
- Add response headers. RFC 9745, published in 2025 on the IETF Standards Track, defines the
DeprecationHTTP response header, whose value is a date. TheSunsetheader from RFC 8594 can state when the resource is expected to stop responding, and the sunset time must not be earlier than the deprecation date. - Keep both versions running side by side for a stated period.
- Watch per-version traffic and contact the remaining callers.
- Switch the old version off on the announced date, or extend it deliberately if a critical consumer needs more time.
How long should the period be? There is no universal number, so choose by consumer type. Google's guidance recommends 180 days for removing beta functionality, which is a reasonable minimum reference for external users. Internal consumers can move faster because you can talk to them.
What Kubernetes teaches about API policy
Kubernetes publishes its rules, which makes it a good model. Versions follow a track: v1 is stable (GA), v1beta1 is beta, v1alpha1 is alpha. API elements can only be removed by incrementing the API group version. Objects must convert between versions without losing information. A GA API can be deprecated but not removed within a major Kubernetes version, while a beta API is not served any sooner than 9 months or 3 minor releases after deprecation, whichever is longer. Since v1.19, requests to deprecated endpoints receive a Warning header and are flagged in audit events.
You can copy the pattern: define stability levels, write the removal rules down, make old and new versions convertible, and tell callers at request time. Kubernetes manifests are deployed through pipelines, so teams that run clusters also meet this in practice when a manifest uses an API version that a new cluster release no longer serves.
Common mistakes
- Treating versioning as a purely technical routing problem with no owner for decisions.
- Bumping the major version for every change, which leaves clients with many versions to track.
- Never retiring anything, so the support burden grows each year.
- Changing the meaning of a field without changing its shape. No tool detects this, so contract tests and review matter.
- Exposing minor and patch numbers in the URL, which pushes clients to migrate for no reason.
- Not logging the version on each request, so you cannot tell who is still on the old one.
Learning path
API versioning touches CI/CD, gateways, Git workflows and release strategy. These are covered across the DevOps training in Pune, offered in the classroom at Kharadi or live online. For the monitoring side of knowing who uses which version, see how SLOs align DevOps with business goals.
Frequently asked questions
Who is responsible for API versioning in a DevOps team?
The API owner decides what is breaking and when to retire a version. Developers implement and support versions, DevOps or platform engineers automate checks and routing, and a governance group sets shared rules.
What is a breaking change in an API?
Any change that can make a correctly written existing client fail. Removing or renaming a field, changing a type, making an optional field required, and changing error responses are typical examples.
Should I put the version in the URL or in a header?
URI versioning is simpler to route, cache and test. Header versioning keeps URLs stable but is harder to test and needs caches to vary on the header. Choose one and use it consistently across all your APIs.
Do I need semantic versioning for a REST API?
Use it for the release number of the service and for client libraries. For the public interface, expose only the major version, as Google's API guidance does, and keep MINOR and PATCH internal.
How do I detect breaking changes automatically?
Keep the API description in the repository, compare it with the last released version in CI, and add consumer contract tests that replay what clients rely on. Fail the build if a break appears without a new major version.
How should I announce that an API version is deprecated?
Use the changelog, the developer portal and direct messages, and add a Deprecation header (RFC 9745) and optionally a Sunset header (RFC 8594) to responses. Give a clear end date.
How long should I support an old API version?
It depends on your consumers. Google recommends 180 days before removing beta functionality. For stable external APIs teams usually allow longer, and for internal APIs they can allow less because they can contact the callers directly.
Can GitOps help with API versioning?
Yes. Gateway routes, version rollouts and policies can live in Git, reviewed and applied by a controller, so every version change is traceable. The API contract itself should also be reviewed through pull requests.
References
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0