Skip to content
StackDecode
System Design
10. API Design and ManagementAnimated

API Versioning

Changing an API without breaking clients.

The idea

Version through the URL, header or media type, and keep old versions alive for a deprecation period.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientAPI gatewayAuthOrdersCatalogData
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Every client request enters through the gateway.

step:
1/4
at:
Client
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Make changes backwards-compatible if possible
  2. 2Introduce a new version for breaking changes
  3. 3Announce deprecation
  4. 4Retire the old version

Where it is used

Long-lived public APIs.

Watch out for

Supporting too many versions at once.

Related