News for hackers. Stuff that matters.
Re:How to Version an API by BillinghamJ on Thursday June 08, 2017 @03:03PM (#14516322)
Currently I structure my URLs like this:

    /v1/2017-06-08/blah
The idea is that you write in the date that you wrote the implementation against the API. This is just like Stripe's API, but explicit rather than implicit. Then everything under that will continue to work as-is.

There's a few reasons I like to do this, but the main one is that I often struggle to decide whether a given change is really "worthy" of a major version change.

The only rule/caveat we have is: within a given client's implementation, you should only use one date at a time. Mixing them creates a small possibility of compatibility issues.

The initial /v1/ is just in case I decide to move away from the date thing at some stage.

Re:How to Version an API by edoceo on Thursday June 08, 2017 @03:12PM (#14516386)
I'm similar but just prefix like

    /v2014
I assume I won't make multiple versions in a year. I have a current system with /v2014, /v2016 and /v2017

I like to smash dates into all my version strings

Re:How to Version an API by cyann on Thursday June 08, 2017 @03:31PM (#14516531)
Yes, human readable dates are very good at conveying a sense of obsolescence.

Mine are a bit more granular: /vyymm, e.g. /v1503, /v1610, /v1706. This should work well for this century ;-)