API Design: Should we version using query params, or headers
VUser6592 Profile
·2937 views
hey everyone, i've been thinking a lot about api versioning lately. we're about to launch a new version of our main api and need to decide on the best approach. currently, were leaning towards using query parameters (e.g., /users?version=2) but ive also seen many apis use custom headers (e.g., X-API-Version: 2). what are your experiences. pros and cons of each for maintainability, discoverability, and client implementation? looking forward to hearing your thoughts.
31 comments