Use links not keys to represent relationships in APIs
Here is the problem with links in a nutshell:> The server is now free to change the format of new URLs at any time without affecting clients (of course, the server must continue to honor all previously-issued URLs).If you have to honor all previously-issued URLs then you aren't changing your format -- you are supporting two formats from now on, the old one and the new one.You can of course tell your users that you will deprecate the old format, but unless you are as powerful as Google your users may prevent you from enforcing a deadline for deprecation.If the URLs in your API responses are FQDNs rather than relative paths, all of this gets significantly harder to deal with.Even if you figured all of that out, links are not idiomatic if your users consume your api via an RPC or GraphQL.