Versioning an API without pain later

Back to list2026-01-21
You

Path versioning or headers?

ChatGPT

Path versioning, for a small team. It is visible in logs, cacheable, and trivially explained. Header negotiation is more elegant and is the version people get wrong in curl, in caches and in the one client that matters.

You

Offset pagination skips rows when new ones arrive.

ChatGPT

Use a keyset: order by a stable column plus the primary key, and pass the last seen values as the cursor. Offsets are computed against a moving table, which is precisely why rows appear twice or vanish.