API versioning

If third-party clients use your API, you could consider versioning your API to avoid breaking changes when you update your application.

Versioning an API is often a matter of making a set of stable resources available under subdomains. For instance, GitLab maintains three versions of its API. They are accessible under https://example/api/v3, and so on. Like a lot of architectural decisions in software, versioning is a tradeoff.

It will require more work to design such an API and identify breaking changes in the API. Often, the addition of new fields will not be as problematic as removing or transforming the API entity results or requests.

Most of the time, you will be in charge of both the API and the client, thereby removing the need for such sophistication.

Note

See this blog post for a more in-depth discussion about API versioning:

http://www.troyhunt.com/2014/02/your-api-versioning-is-wrong-which-is.html

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset