Keith Schacht’s Weblog

Subscribe

💡 TIL: Elegant solution to versioning an API

24th February 2025

The couple times I’ve done API versioning it was with /v1/ or v1.domain.com. Both of these are the generally recommended pattern within rails. This article outlines a querystring based approach to API versioning and a much more flexible implementation strategy that avoids a lot of duplication and code maintenance.

via

More recent articles

This is Elegant solution to versioning an API by Keith Schacht, posted on 24th February 2025.

Part of series Today I Learned

  1. NASA's Dragonfly probe to Saturn's Titan in 2028 - Nov. 26, 2024, 2:58 p.m.
  2. Rails ActiveRecord has a .sole method - Nov. 26, 2024, 11:15 p.m.
  3. pick is the single-value version of pluck in Rails - Nov. 26, 2024, 11:24 p.m.
  4. Elegant solution to versioning an API - Feb. 24, 2025, 3:13 p.m.
  5. Regex within string square brackets - Feb. 24, 2025, 3:16 p.m.
  6. Ruby's clamp method reduces conditionals - Feb. 24, 2025, 3:19 p.m.

Next: Regex within string square brackets

Previous: pick is the single-value version of pluck in Rails