News for hackers. Stuff that matters.
Re:Use links not keys to represent relationships in APIs by twblalock on Sunday May 12, 2019 @03:20AM (#19890629)
If you save the relative URL in your database and then the API changes its URL schema, you will need to migrate everything you stored to the new schema.

If all you stored was the ID, all you would need to change is the logic in your API client which accepts the ID and constructs the URL for it.

Re:Use links not keys to represent relationships in APIs by chii on Sunday May 12, 2019 @04:51AM (#19890865)
a change that necessitate a URL schema change would be just as far reaching had the system been designed with using IDs.

For example, if the entity ID changes from being an integer, to being a GUID, you'd still have to write code to update your schema (presumably, from an int column to a GUID/string column).