Catalogue / planetscale-2022-api-public-ids

PlanetScale's API exposes 12-character NanoIDs as public identifiers beside auto-incrementing primary keys

PlanetScale. PlanetScale API.

Organisation
PlanetScale
Evidence
Reported from production
Source
Why we chose NanoIDs for PlanetScale’s API

PlanetScale blog, published 2022-03-29

Records

Decision#d1

Use 12-character NanoIDs as public API identifiers, not integer IDs or UUIDs

Decision#d2

Store the public ID in its own uniquely constrained column and retry generation on a duplicate

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.