6 ms·
Your reasoning for having the api at a subdomain applies for versioning is well. Imagine v1 of the api is written quickly in PHP. As the needs of the company
by dieselz 15y ago
Your reasoning for having the api at a subdomain applies for versioning is well. Imagine v1 of the api is written quickly in PHP. As the needs of the company change, you may need to iterate on the api and build v2 with Java. Managing versions by api.example.com/v1 and api.example.com/v2 would be difficult. Here are two suggestions: v1.api.example.com or v1api.example.com.
- johns 15y agoRouting on the path is trivial for many different proxies.
- bromley 15y agoYes but you still need a proxy. With versioning in the subdomain you can easily route requests for different versions to completely different systems. That flexibility might come in handy one day.
- vog 15y agoIn how far is this less effort than the proxy? In the one case you add a line to your web server config, in the other case to your DNS server config.