O'Reilly logo

RESTful Java Patterns and Best Practices by Bhakti Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

API versioning

For the evolution of the application, the URI design should have some constraints to identify the version. It is hard to foresee all the resources, which will change during the life of the application. The goal with API versioning is to define the resource endpoints and the addressing schemes and associate a version with them. The API developers must ensure the HTTP verbs' semantics and status codes should continue to work without human intervention as the version changes. Over the life span of the application, the version will evolve, and the APIs may need to be deprecated. Requests to older versions of the API can be redirected to the latest code path or there can be appropriate error codes that indicate the API is obsolete.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required