# API design: Why you should use links, not keys, to represent relationships in APIs | Google Cloud Blog

<https://cloud.google.com/blog/products/application-development/api-design-why-you-should-use-links-not-keys-to-represent-relationships-in-apis>

- Host: [cloud.google.com](https://links.thingelstad.xyz/hosts/cloud.google.com/)
- Saved: May 14, 2019 (2019-05-14T10:51:22Z)
- Record: https://links.thingelstad.xyz/links/7de3968bed39/
- JSON: https://links.thingelstad.xyz/links/7de3968bed39.json

## What Jamie wrote

I am a fan of this concept and have advocated for it in platforms for a while, particularly large and complicated platforms, which most are.

> Viewed from an implementation point of view, replacing all the database keys with links is a fairly simple change—the server converted the database foreign keys into URLs so the client didn't have to—but it significantly simplifies the API and reduces the coupling of the client and the server. Many URI templates that were essential for the first design are no longer required and can be removed from the API specification and documentation.

Think of your platform as a little web (lowercase w) of it’s own, and using links to establish the relationships. 🔗

## Facts

- Kind: [Page](https://links.thingelstad.xyz/kinds/page/)

## Appears in

- [WT106: Weekly Thing #106 / May 18, 2019](https://weekly.thingelstad.com/archive/106/), Notable Links 📌

## Same host

- [Knative - Built on Kubernetes and Istio  |  Google Cloud](https://links.thingelstad.xyz/links/d051ff8d2d93/) (cloud.google.com, July 26, 2018)
- [Announcing Snowflake on Google Cloud Platform | Google Cloud Blog](https://links.thingelstad.xyz/links/c08ba2d33469/) (cloud.google.com, June 4, 2019)
- [An update on Sunday’s service disruption | Google Cloud Blog](https://links.thingelstad.xyz/links/fe34ae120edd/) (cloud.google.com, June 6, 2019)
- [Women in leadership: Why Diversity, Equity and Inclusion matters at Google Cloud | Google Cloud Blog](https://links.thingelstad.xyz/links/df59247aa0d1/) (cloud.google.com, March 11, 2021)
- [Retailers unwrap a successful 2021 holiday season with Google’s Black Friday/Cyber Monday program](https://links.thingelstad.xyz/links/ad84f7e4cf8a/) (cloud.google.com, January 25, 2022)

## Saved the same week

- [Why Go? – Key advantages you may have overlooked · YourBasic Go](https://links.thingelstad.xyz/links/ffa3095ba3de/) (yourbasic.org, May 14, 2019)
- [Amazon S3 Path Deprecation Plan – The Rest of the Story | AWS News Blog](https://links.thingelstad.xyz/links/fe198f8097d7/) (aws.amazon.com, May 14, 2019)
- [Denver votes to decriminalise magic mushrooms by razor-thin margin - BBC News](https://links.thingelstad.xyz/links/d8b7b1973bcb/) (bbc.com, May 14, 2019)
- [Disrupting the Tech Profession’s Gender Gap](https://links.thingelstad.xyz/links/dfb45fdff7c9/) (shrm.org, May 14, 2019)
- [Cooking As A Service – danco.blog](https://links.thingelstad.xyz/links/ce47dc3d0fac/) (alexdanco.com, May 14, 2019)

## Elsewhere

- Wayback Machine: https://web.archive.org/web/*/https://cloud.google.com/blog/products/application-development/api-design-why-you-should-use-links-not-keys-to-represent-relationships-in-apis
