Re:Use links not keys to represent relationships in APIs
by zepolen on Sunday May 12, 2019 @01:19PM
(#19893153)
Redirecting doesn't work - your customer has an application expecting v1 format - and he gets a redirect to v2 which breaks his application.
I've found more success in supporting two formats using the v2 api to serve the v1 one.
Instead, you could just use a database of redirects which you append to when you make format changes. For some applications, the overhead of maintaining a redirect service is far lower than trying to maintain support for multiple formats. (And this redirect service may even be something you need/want for other reasons.)