API versioning
When designing a REST API, you genuinely believe you are doing it right and will not need significant changes. Maybe some new features and extra fields, but nothing backward incompatible. However, the reality is that you never know where the project will take you. Sometimes, a slight change in the data model leads to a breaking change. Sometimes, you have to restructure how you access the data for performance reasons. Anyway, it is good to be prepared for changes in the future, and even if you did it 100% right since the beginning, there is almost no cost to being ready for the need for a new version of your API.
The standard practice on this is to build your API using a version in the URL, as we have seen in the /api/v1/users examples. If you need to create a new version of your API, you can keep your /api/v1/users route with the current existing behavior and create a new /api/v2/users with the new behavior, allowing you to have both versions running at the same...