API Versioning Strategy: Path, Header, or Query Parameter?
Emma Okonkwo
·8 views
Hey everyone, I'm kicking off a new API design and we're debating the best approach for API versioning. We have a few options on the table: path-based (e.g., /v1/resource), header-based (e.g., Accept: application/vnd.myapi.v1+json), or query parameter-based (e.g., /resource?api-version=1). Each has its pros and cons regarding caching, client flexibility, and general RESTfulness. What strategies have you found most effective in production, especially for APIs that evolve frequently or need to support multiple active versions? Any horror stories or unexpected benefits from one method over another? I'm particularly interested in experiences with developer tooling and client library generation. Thanks for your insights!
0 comments