News for hackers. Stuff that matters.
Re:Use links not keys to represent relationships in APIs by zjs on Sunday May 12, 2019 @12:55PM (#19892981)
You don't necessarily need to support two formats; you need to support redirecting the previously-issued URLs. This _can_ be accomplished by supporting the old format, but it doesn't _need_ to be.

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.)

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.