
Ask HN: In REST APIs, should the version be at the start or end of the path? - _448
Say I have this REST API path: &#x2F;api&#x2F;ca&#x2F;cb&#x2F;cc<p>Which of the following is a better way to include version string, e.g. v0, in the API?<p>&#x2F;api&#x2F;v0&#x2F;ca&#x2F;cb&#x2F;cc<p>or<p>&#x2F;api&#x2F;ca&#x2F;cb&#x2F;cc&#x2F;v0
======
buttheyare
Whatever works better for you. Generally I'd recommend the former, simply due
to the fact the other one might imply everything from vX is a part of vY,
which usually isn't the case in my experience. Though, you shouldn't really
care about those kind of micro-optimizations at any point of (early)
development, let alone post on hn asking about it.

~~~
_448
> you shouldn't really care about those kind of micro-optimizations at any
> point of (early) development

Changing APIs afterwards would become very difficult, hence the reason for
early decision.

