URL Path Version

The most common solution. Add/v1/and/v2/to the URL. Simple and intuitive, clear at a glance. The disadvantage is contaminating URLs.

Header version

Add the Accept Version field in the request header. Keep the URL clean. The disadvantage is that it is not intuitive and difficult to debug.

How to choose

Open API with URL path version, simple and intuitive. The internal API can use the header version, which makes the URL cleaner.

Disclaimer: Articles on this site come from original content, reposts, AI generation, and other sources. If there are copyright or other issues, pleaseclick here to feedback, and our company will verify and handle it promptly.