Different approaching for API versioning:
Most frequent in the URL: https://api.com/v2/restaurants/123
Custom header: X-API-Version: 2
Less frequent, with an accept header. Clients don’t have to change endpoint, but update headers:
GET /restuarants
Accept: application/vnd.restaurants.v2+json
Source: https://www.slideshare.net/restlet/the-neverending-rest-api-design-debate (slide 80)
Versioning | Different approaches |
RestCase | https://blog.restcase.com/restful-api-versioning-insights/ |
Stackoverflow | https://stackoverflow.com/questions/27054277/how-to-distinguish-application-state-and-resource-state |
SymfonyCasts | https://symfonycasts.com/screencast/rest/client-state |