Managing multiple API versions
In Chapter 13, you learned about the most common API versioning strategies. Having a versioning strategy means you care about your consumers’ expectations. Whenever you change your API version, you’re signaling to your users that you’ve introduced changes. Let’s start by reviewing some versioning strategies you can use:
- URL path
- HTTP query parameter
- HTTP version header
- HTTP
Accept
header - Message topic or channel
All API versioning strategies have the common goal of helping consumers identify the version they want to interact with. However, they also help you define how you want your API consumers to behave. It’s important to identify – and communicate – what you want consumers to do when you announce a new API version. Do you want all your consumers to use the new version immediately? How will they move to the new version depends on how you identify what the “latest...